Skip to content

Commit c255931

Browse files
bors[bot]bidoubiwa
andauthored
Merge #386
386: Add jest watch r=bidoubiwa a=bidoubiwa fixes: #385 Co-authored-by: Charlotte Vermandel <[email protected]>
2 parents fe107bb + f3b8578 commit c255931

File tree

5 files changed

+19
-15
lines changed

5 files changed

+19
-15
lines changed

jest.config.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
module.exports = {
22
verbose: true,
3+
watchPlugins: [
4+
'jest-watch-typeahead/filename',
5+
'jest-watch-typeahead/testname',
6+
],
37
projects: [
48
{
59
preset: 'ts-jest',
610
displayName: 'dom',
711
// We are using jest-environment-jsdom 25 until we stop supporting node 10
812
// jest-environment-jsdom 25 uses jsdom 15 which still supports node 10
913
testEnvironment: 'jest-environment-jsdom',
10-
testPathIgnorePatterns: [
11-
'<rootDir>/tests/env/express',
12-
'<rootDir>/playgrounds/angular',
13-
],
14+
testPathIgnorePatterns: ['<rootDir>/tests/env', '<rootDir>/playgrounds'],
1415
},
1516
{
1617
preset: 'ts-jest',
1718
displayName: 'node',
1819
testEnvironment: 'node',
19-
testPathIgnorePatterns: [
20-
'<rootDir>/tests/env/express',
21-
'<rootDir>/playgrounds/angular',
22-
],
20+
testPathIgnorePatterns: ['<rootDir>/tests/env', '<rootDir>/playgrounds'],
2321
},
2422
],
2523
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"description": "The search client to use MeiliSearch with InstantSearch.",
66
"scripts": {
77
"cleanup": "shx rm -rf dist/",
8-
"test": "yarn build && jest",
8+
"test:watch": "yarn test --watch",
9+
"test": "jest",
910
"test:all": "yarn test && yarn test:env && yarn test:playgrounds && yarn test:e2e",
1011
"test:env": "yarn build && yarn test:env:browser && yarn test:env:nodejs && yarn test:env:esm && yarn test:env:ts",
1112
"test:env:browser": "yarn --cwd tests/env/express && yarn --cwd tests/env/express test",
@@ -92,7 +93,7 @@
9293
"instantsearch.js": "^4.16.1",
9394
"jest": "^26.6.3",
9495
"jest-environment-jsdom": "25.5",
95-
"jest-watch-typeahead": "^0.6.0",
96+
"jest-watch-typeahead": "^0.6.3",
9697
"prettier": "^2.0.0",
9798
"regenerator-runtime": "^0.13.7",
9899
"rollup": "^2.40.0",

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const PLUGINS = [
2020
useTsconfigDeclarationDir: true,
2121
tsconfigOverride: {
2222
includes: ['src'],
23-
exclude: ['tests', 'examples', '*.js', 'scripts'],
23+
exclude: ['tests', '*.js', 'scripts', '**/__tests__/*.ts'],
2424
esModuleInterop: true,
2525
},
2626
}),
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
describe('Working test', () => {
2+
it('equal', () => {
3+
expect(3).toBe(3)
4+
})
5+
})

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4457,10 +4457,10 @@ jest-validate@^26.6.2:
44574457
leven "^3.1.0"
44584458
pretty-format "^26.6.2"
44594459

4460-
jest-watch-typeahead@^0.6.0:
4461-
version "0.6.1"
4462-
resolved "https://registry.yarnpkg.com/jest-watch-typeahead/-/jest-watch-typeahead-0.6.1.tgz#45221b86bb6710b7e97baaa1640ae24a07785e63"
4463-
integrity sha512-ITVnHhj3Jd/QkqQcTqZfRgjfyRhDFM/auzgVo2RKvSwi18YMvh0WvXDJFoFED6c7jd/5jxtu4kSOb9PTu2cPVg==
4460+
jest-watch-typeahead@^0.6.3:
4461+
version "0.6.3"
4462+
resolved "https://registry.yarnpkg.com/jest-watch-typeahead/-/jest-watch-typeahead-0.6.3.tgz#26efa37da39a46d8ff417b9e4badc8176a698016"
4463+
integrity sha512-rM+2m2U/7o4VeXxA3rcEWbbKq8K/aGjAwCgmqsthPV1AqLb5NNACzS+tDCD11bdQ8MrN+H3uN61Y9qFiJgtZPw==
44644464
dependencies:
44654465
ansi-escapes "^4.3.1"
44664466
chalk "^4.0.0"

0 commit comments

Comments
 (0)