Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

fix compilation error not detected during lint #852

Merged
merged 1 commit into from
Mar 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- run:
name: tslint
command: mkdir reports reports/junit; npm run tslint-ci
command: mkdir reports reports/junit; npm run tslint:ci

- run:
name: build
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ install:

script:
- npm run clean
- npm run tslint:ci
- npm run buildWebpack
- npm run test

Expand Down
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"metagen": "node ./tests/meta/meta-generator \"./src/components\" \"./dist/components\" && node ./tests/meta/meta-generator \"./src/mixins\" \"./dist/mixins\"",
"metagenv2": "node -r ./tests/meta-v2/ts-loader.js ./tests/meta-v2/generate-meta.ts ./dist",
"test": "jest --ci -w 1 --silent --coverage --testResultsProcessor=./tests/jest/ci-test-processor && jest -w 1 --ci --silent --config ./conf/storybook/jest.config.storybook.js --verbose",
"tslint": "tslint --project tsconfig.json -s node_modules/custom-tslint-formatters/formatters -t grouped",
"tslint-ci": "tslint --project tsconfig.json -t junit -o reports/junit/js-lint-results.xml ",
"tslint": "tsc --noEmit && tslint --project tsconfig.json -s node_modules/custom-tslint-formatters/formatters -t grouped ",
"tslint:ci": "tsc --noEmit && tslint --project tsconfig.json -t junit -o reports/junit/js-lint-results.xml ",
"prepack": "npm run clean && npm run build && npm run buildlib",
"component": "node ./tests/meta/component-generator",
"stats": "webpack --config conf/webpack.config.js --env.lib --env.silent --colors --profile --json > reports/stats.json && webpack-bundle-analyzer reports/stats.json",
Expand Down Expand Up @@ -114,7 +114,7 @@
"ts-loader": "^5.3.3",
"ts-morph": "^1.0.0",
"ts-node": "^7.0.1",
"tslint": "^5.12.0",
"tslint": "^5.14.0",
"tslint-config-standard": "^8.0.1",
"typescript": "^3.2.2",
"typescript-tslint-plugin": "^0.3.0",
Expand Down
18 changes: 9 additions & 9 deletions src/utils/file/file.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ describe('FileService', () => {
const mockHttpService: () => jest.Mocked<HttpService> = () => {
httpSvcMock = new HttpService() as jest.Mocked<HttpService>;
(Vue.prototype as ModulVue).$http = httpSvcMock;
httpSvcMock.execute.mockReturnValue(Promise.resolve());
httpSvcMock.execute.mockReturnValue(Promise.resolve() as any);

return httpSvcMock;
};
Expand Down Expand Up @@ -332,7 +332,7 @@ describe('FileService', () => {

it('should set the file status as failed when an error is encountered', async () => {
httpSvcMock.execute.mockReturnValue(
Promise.reject('network error')
Promise.reject('network error') as any
);

try {
Expand All @@ -349,9 +349,9 @@ describe('FileService', () => {
url: 'http://fake'
});

let axiosOptions: AxiosRequestConfig;
let axiosOptions: AxiosRequestConfig | undefined;
axiosOptions = httpSvcMock.execute.mock.calls[0][1];
axiosOptions.onUploadProgress!({
axiosOptions!.onUploadProgress!({
loaded: 10,
total: 200
});
Expand All @@ -367,9 +367,9 @@ describe('FileService', () => {
onUploadProgress: () => (customUploadProgressCalled = true)
});

let axiosOptions: AxiosRequestConfig;
let axiosOptions: AxiosRequestConfig | undefined;
axiosOptions = httpSvcMock.execute.mock.calls[0][1];
axiosOptions.onUploadProgress!({
axiosOptions!.onUploadProgress!({
loaded: 10,
total: 200
});
Expand Down Expand Up @@ -403,9 +403,9 @@ describe('FileService', () => {
url: 'http://fake'
});

let axiosOptions: AxiosRequestConfig;
let axiosOptions: AxiosRequestConfig | undefined;
axiosOptions = httpSvcMock.execute.mock.calls[0][1];
expect(axiosOptions.cancelToken).not.toBeUndefined();
expect(axiosOptions!.cancelToken).not.toBeUndefined();
});

it('should cancel the request using token', () => {
Expand All @@ -422,7 +422,7 @@ describe('FileService', () => {
httpSvcMock.execute.mockReturnValue(
Promise.reject({
__CANCEL__: true
})
}) as any
);

await filesvc.upload(fileToUpload.uid, {
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
]
},
"exclude": [
"node_modules",
"dist",
"tests/meta/**.*",
"conf/**"
]
Expand Down