Skip to content
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

feat: migrate to jest #379

Merged
merged 39 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ead4584
feat: migrate to jest
snitin315 May 6, 2023
6893a55
chore: create alias.test.js
snitin315 May 6, 2023
b468c7d
feat: migrate alias.test.js to jest
snitin315 May 6, 2023
66759d2
chore: improve husky setup
snitin315 May 6, 2023
9c7bc00
chore: update lockfile
snitin315 May 6, 2023
6327630
feat: migrate browserField.test.js to jest
snitin315 May 6, 2023
54202cf
feat migrate CachedInputFileSystem.test.js to jest
snitin315 May 6, 2023
aefd3ed
feat migrate dependencies.test.js to jest
snitin315 May 6, 2023
9b2c316
feat: migrate unsafe-cache.test.js to jest
snitin315 May 6, 2023
9a401f2
feat: migrate test/SyncAsyncFileSystemDecorator.test.js to jest
snitin315 May 6, 2023
caab785
feat: migrate test/symlink.test.js to jest
snitin315 May 6, 2023
0e99f4e
feat: migrate test/simple.test.js to jest
snitin315 May 6, 2023
d5e8a14
feat: migrate scope-packages.test.js to jest
snitin315 May 6, 2023
b42b688
feat: migrate roots.test.js to jest
snitin315 May 6, 2023
f369f66
feat: migrate restrictions.test.js to jest
snitin315 May 6, 2023
dda250d
feat: migrate resolve.test.js to jest
snitin315 May 6, 2023
a4802eb
feat: migrate resolve.test.js to jest
snitin315 May 6, 2023
731033e
feat: migrate pr-53.test.js to jest
snitin315 May 6, 2023
1108dc8
feat: migrate pnp.test.js to jest
snitin315 May 6, 2023
b721ecb
feat: migrate plugins.test.js to jest
snitin315 May 6, 2023
718bc44
feat: migrate path.test.js to jest
snitin315 May 6, 2023
a468cf8
feat: migrate missing.test.js to jest
snitin315 May 7, 2023
8befcb6
ci: fix
snitin315 May 7, 2023
61c742f
feat: migrate incorrect-description-file.test.js to jest
snitin315 May 7, 2023
7518506
feat: migrate importField.test.js to jest
snitin315 May 7, 2023
2995ff4
feat: migrate identifier.test.js to jest
snitin315 May 13, 2023
a058b4f
feat: migrate getPath.test.js and fullSpecified.test.js to jest
snitin315 May 13, 2023
b453a2c
feat: migrate forEachBail.test.js to jest
snitin315 May 13, 2023
b506c7a
feat: migrate extensions.test.js to jest
snitin315 May 13, 2023
815f974
feat: migrate extension-alias.test.js to jest
snitin315 May 13, 2023
aa085a2
feat: migrate exportsField.test.js to jest
snitin315 May 13, 2023
99f7cb4
feat: migrate exportsField.test.js to jest
snitin315 May 13, 2023
6bce980
fix: tests
snitin315 May 13, 2023
a5fd901
feat: migrate fallback.test.js to jest
snitin315 May 13, 2023
c0abfb4
feat: migrate yield.test.js to jest
snitin315 May 14, 2023
d9068df
chore: remove mocha and nyc
snitin315 May 14, 2023
3c74351
chore: remove should.js
snitin315 May 14, 2023
d8edda7
ci: fix lint
snitin315 May 14, 2023
beed6bb
ci: fix lint
snitin315 May 14, 2023
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
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module.exports = {
{
files: ["test/**/*.js"],
env: {
mocha: true
jest: true
}
}
]
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --frozen-lockfile
- run: yarn cover:ci
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Run tests with coverage
run: npm run test:coverage -- --ci
- if: ${{ matrix.os != 'windows-latest' }}
uses: codecov/codecov-action@v3
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
moduleFileExtensions: ["js", "mjs", "cjs", "ts"]
};
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"license": "MIT",
"devDependencies": {
"@types/mocha": "^8.0.3",
"@types/jest": "^27.5.1",
"@types/node": "^14.11.1",
"cspell": "4.2.8",
"eslint": "^7.9.0",
Expand All @@ -27,12 +27,10 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.4",
"husky": "^6.0.0",
"jest": "^27.5.1",
TheLarkInn marked this conversation as resolved.
Show resolved Hide resolved
"lint-staged": "^10.4.0",
"memfs": "^3.2.0",
"mocha": "^8.1.3",
"nyc": "^15.1.0",
"prettier": "^2.1.2",
"should": "^13.2.3",
"tooling": "webpack/tooling#v1.14.0",
"typescript": "^4.2.0-beta"
},
Expand All @@ -53,11 +51,11 @@
"pretty": "prettier --loglevel warn --write \"lib/**/*.{js,json}\" \"test/*.js\"",
"pretest": "yarn lint",
"spelling": "cspell \"**/*.*\"",
"test": "mocha --full-trace --check-leaks",
"test:only": "mocha --full-trace --check-leaks",
"test:only": "jest",
"test:watch": "yarn test:only -- --watch",
"test:coverage": "yarn test:only -- --collectCoverageFrom=\"lib/**/*.js\" --coverage",
"test": "yarn test:coverage",
"precover": "yarn lint",
"cover": "nyc --reporter=html node node_modules/mocha/bin/_mocha --full-trace --check-leaks",
"cover:ci": "nyc --reporter=lcovonly node node_modules/mocha/bin/_mocha --full-trace --check-leaks",
"prepare": "husky install"
},
"lint-staged": {
Expand Down
Loading