fix: extends timeout for timed out test (#208)
* fix: extends timeout for timed out test * fix: add dependent script to turbo test * fix: disable threading for test * fix: add timeout to vitest config * chore: remove test-ci script * fix: extends timeout to validator vitest config * chore: conditionally disabling vitest threading on CI
This commit is contained in:
parent
7d05ecc580
commit
0853ca3b8f
6 changed files with 21 additions and 10 deletions
2
.github/workflows/build-and-test.yml
vendored
2
.github/workflows/build-and-test.yml
vendored
|
@ -28,5 +28,5 @@ jobs:
|
|||
- run: npm ci
|
||||
- run: npm run clean
|
||||
- run: npm run check
|
||||
- run: npm run test-ci
|
||||
- run: npm run test
|
||||
- run: npm run lint
|
||||
|
|
|
@ -28,8 +28,7 @@
|
|||
"patch": "npm version patch -w",
|
||||
"minor": "npm version minor -w",
|
||||
"major": "npm version major -w",
|
||||
"publish": "turbo run lint build test && npm publish --access public -w",
|
||||
"test-ci": "npm run test --workspaces --if-present"
|
||||
"publish": "turbo run lint build test && npm publish --access public -w"
|
||||
},
|
||||
"license": "ISC",
|
||||
"workspaces": [
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
test: {},
|
||||
test: {
|
||||
testTimeout: 30000,
|
||||
threads: !process.env.CI,
|
||||
},
|
||||
});
|
||||
|
|
|
@ -9,9 +9,13 @@ describe('Example Tests', () => {
|
|||
});
|
||||
|
||||
describe('Component test', async () => {
|
||||
it('example component should not be empty', async () => {
|
||||
component = await getComponentOutput('./Validator.astro');
|
||||
expect(component.html).not.to.equal('\n');
|
||||
});
|
||||
it(
|
||||
'example component should not be empty',
|
||||
async () => {
|
||||
component = await getComponentOutput('./Validator.astro');
|
||||
expect(component.html).not.to.equal('\n');
|
||||
},
|
||||
{ timeout: 10000, retry: 3 }
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
test: {},
|
||||
test: {
|
||||
testTimeout: 30000,
|
||||
},
|
||||
});
|
||||
|
|
|
@ -17,7 +17,10 @@
|
|||
"dev": {
|
||||
"cache": false
|
||||
},
|
||||
"test": {},
|
||||
"test": {
|
||||
"env": ["CI"],
|
||||
"outputs": []
|
||||
},
|
||||
"check": {},
|
||||
"clean": {}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue