Skip to content

[RFC] test: one snapshot per fixture test #1152

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ node_modules
dist
jest.config.js
fixtures
shared-fixtures
shared-fixtures/fixtures
coverage

packages/eslint-plugin-tslint/tests
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
**/tests/fixture-project/**/*
**/dist
**/coverage
**/shared-fixtures
**/shared-fixtures/fixtures/**/*
**/tests/integration/fixtures/**/*
**/.vscode
**/.nyc_output
Expand Down
8 changes: 6 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ jobs:
yarn check:configs
displayName: 'Validate plugin configs'

- script: |
yarn check:tests
displayName: 'Validate generated fixture tests'

- script: |
yarn test
displayName: 'Run unit tests'
Expand Down Expand Up @@ -80,8 +84,8 @@ jobs:
- job: publish_canary_version
displayName: Publish the latest code as a canary version
dependsOn:
- primary_code_validation_and_tests
- unit_tests_on_other_node_versions
- primary_code_validation_and_tests
- unit_tests_on_other_node_versions
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'master'), ne(variables['Build.Reason'], 'PullRequest'))
pool:
vmImage: 'Ubuntu-16.04'
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"cz": "git-cz",
"check:docs": "lerna run check:docs",
"check:configs": "lerna run check:configs",
"check:tests": "lerna run check:tests",
"generate-contributors": "yarn ts-node ./tools/generate-contributors.ts && yarn all-contributors generate",
"format": "prettier --write \"./**/*.{ts,js,json,md}\"",
"format-check": "prettier --list-different \"./**/*.{ts,js,json,md}\"",
Expand Down Expand Up @@ -80,6 +81,6 @@
"url": "https://opencollective.com/typescript-eslint"
},
"resolutions": {
"typescript": "^3.7.0-dev.20191018"
"typescript": "^3.7.0-dev.20191021"
}
}
3 changes: 2 additions & 1 deletion packages/parser/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ module.exports = {
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: './tests/lib/.+\\.ts$',
testRegex: './tests/.*\\.test\\.ts$',
collectCoverage: false,
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
coverageReporters: ['text-summary', 'lcov'],
modulePaths: ['<rootDir>/tests/shared-fixtures'],
};
Loading