Update npm scripts to ignore example tests

This commit is contained in:
John Hildenbiddle
2020-07-20 09:04:10 -04:00
parent 6dab0e2a76
commit 359ead4107
2 changed files with 12 additions and 2 deletions
+9 -2
View File
@@ -18,7 +18,7 @@
"name": "Run current test file",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "test:jest"],
"args": ["--", "-i", "${relativeFile}"],
"args": ["--", "-i", "${relativeFile}", "--testPathIgnorePatterns"],
"console": "integratedTerminal"
},
{
@@ -27,7 +27,14 @@
"name": "Run selected test name",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "test:jest"],
"args": ["--", "-i", "${relativeFile}", "-t", "${selectedText}"],
"args": [
"--",
"-i",
"${relativeFile}",
"-t",
"${selectedText}",
"--testPathIgnorePatterns"
],
"console": "integratedTerminal"
}
]
+3
View File
@@ -8,11 +8,13 @@ module.exports = {
{
displayName: 'unit',
testMatch: ['<rootDir>/tests/unit/*.test.js'],
testPathIgnorePatterns: ['example.test'],
},
// Integration Tests (Jest)
{
displayName: 'integration',
testMatch: ['<rootDir>/tests/integration/*.test.js'],
testPathIgnorePatterns: ['example.test'],
},
// E2E Tests (Jest + Playwright)
{
@@ -21,6 +23,7 @@ module.exports = {
globalTeardown: './tests/e2e/config/jest.teardown.js',
preset: 'jest-playwright-preset',
testMatch: ['<rootDir>/tests/e2e/*.test.js'],
testPathIgnorePatterns: ['example.test'],
},
],
};