Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

test(*): update eslint-plugin-jest and enable recommended rules#190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
armano2 merged 4 commits intotypescript-eslint:masterfromarmano2:eslint-plugin-jest
Feb 3, 2019
Merged
Show file tree
Hide file tree
Changes fromall 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
15 changes: 11 additions & 4 deletions.eslintrc.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,19 +29,26 @@
"overrides": [
{
"files": [
"packages/eslint-plugin-tslint/**/*.ts",
"packages/eslint-plugin/**/*.js",
"packages/parser/**/*.ts",
"packages/typescript-estree/**/*.ts"
"packages/eslint-plugin-tslint/tests/**/*.ts",
"packages/eslint-plugin/tests/**/*.js",
"packages/parser/tests/**/*.ts",
"packages/typescript-estree/tests/**/*.ts"
],
"env": {
"jest/globals": true
},
"rules": {
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-alias-methods": "error",
"jest/no-identical-title": "error",
"jest/no-jasmine-globals": "error",
"jest/no-jest-import": "error",
"jest/no-test-prefixes": "error",
"jest/no-test-callback": "error",
"jest/no-test-return-statement": "error",
"jest/prefer-to-have-length": "warn",
"jest/prefer-spy-on": "error",
"jest/valid-expect": "error"
}
},
Expand Down
2 changes: 1 addition & 1 deletionpackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -58,7 +58,7 @@
"cz-conventional-changelog": "2.1.0",
"eslint": "^5.12.1",
"eslint-plugin-eslint-plugin": "^2.0.1",
"eslint-plugin-jest": "^22.1.3",
"eslint-plugin-jest": "^22.2.2",
"glob": "7.1.2",
"husky": "^1.3.1",
"jest": "23.6.0",
Expand Down
2 changes: 1 addition & 1 deletionpackages/parser/tests/lib/parser.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@ describe('parser', () => {
sourceType: 'script',
useJSXTextNode: true
});
expect(spyScope).toHaveBeenCalledWith(jasmine.any(Object), {
expect(spyScope).toHaveBeenCalledWith(expect.any(Object), {
ecmaFeatures: {},
sourceType: 'script'
});
Expand Down
6 changes: 3 additions & 3 deletionspackages/typescript-estree/tests/lib/parse.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -82,7 +82,7 @@ describe('parse()', () => {
});

expect(spy).toHaveBeenCalledWith(
jasmine.any(Object),
expect.any(Object),
{
code: 'let foo = bar;',
comment: true,
Expand All@@ -96,8 +96,8 @@ describe('parse()', () => {
projects: [],
range: true,
strict: false,
tokens:jasmine.any(Array),
tsconfigRootDir:jasmine.any(String),
tokens:expect.any(Array),
tsconfigRootDir:expect.any(String),
useJSXTextNode: false
},
false
Expand Down
4 changes: 2 additions & 2 deletionspackages/typescript-estree/tests/lib/semanticInfo.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -179,7 +179,7 @@ describe('semanticInfo', () => {
badConfig.project = './tsconfigs.json';
expect(() =>
parseCodeAndGenerateServices(readFileSync(fileName, 'utf8'), badConfig)
).toThrowError(/File .+tsconfigs\.json' not found/);
).toThrow(/File .+tsconfigs\.json' not found/);
Copy link
CollaboratorAuthor

@armano2armano2Feb 2, 2019
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

toThrowError is a alias fortoThrow

});

it('fail to read project file', () => {
Expand All@@ -188,7 +188,7 @@ describe('semanticInfo', () => {
badConfig.project = '.';
expect(() =>
parseCodeAndGenerateServices(readFileSync(fileName, 'utf8'), badConfig)
).toThrowError(/File .+semanticInfo' not found/);
).toThrow(/File .+semanticInfo' not found/);
});

it('malformed project file', () => {
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ describe('Warn on unsupported TypeScript version', () => {

it('should warn the user if they are using an unsupported TypeScript version', () => {
(semver.satisfies as jest.Mock).mockReturnValue(false);
console.log = jest.fn();
jest.spyOn(console, 'log').mockImplementation();
parser.parse('');
expect(console.log).toHaveBeenCalledWith(
expect.stringContaining(
Expand Down
8 changes: 4 additions & 4 deletionsyarn.lock
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2378,10 +2378,10 @@ eslint-plugin-eslint-plugin@^2.0.1:
resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.0.1.tgz#d275434969dbde3da1d4cb7a121dc8d88457c786"
integrity sha512-kJ5TZsRJH/xYstG07v3YeOy/W5SDAEzV+bvvoL0aiG1HtqDmg4mJvNPnn/JngANMmsx8oXlJrIcBTCpJzm+9kg==

eslint-plugin-jest@^22.1.3:
version "22.1.3"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.1.3.tgz#4444108dfcddc5d2117ed6dc551f529d7e73a99e"
integrity sha512-JTZTI6WQoNruAugNyCO8fXfTONVcDd5i6dMRFA5g3rUFn1UDDLILY1bTL6alvNXbW2U7Sc2OSpi8m08pInnq0A==
eslint-plugin-jest@^22.2.2:
version "22.2.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.2.2.tgz#2a80d70a20c27dfb1503a6f32cdcb647fe5476df"
integrity sha512-hnWgh9o39VJfz6lJEyQJdTW7dN2yynlGkmPOlU/oMHh+d7WVMsJP1GeDTB520VCDljEdKExCwD5IBpQIUl4mJg==

eslint-scope@^4.0.0:
version "4.0.0"
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp