mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
Merge pull request #29374 from overleaf/renovate-major-vitest-monorepo
chore(deps): update vitest monorepo to v4 from ^3.2.4 (major) GitOrigin-RevId: 553a8fefadd82598a9ff4089ce468b59791e2d43
This commit is contained in:
@@ -27,6 +27,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.0.4",
|
||||
"vitest": "^3.2.4"
|
||||
"vitest": "^4.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
2709
package-lock.json
generated
2709
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -48,6 +48,6 @@
|
||||
"sinon": "~9.0.2",
|
||||
"sinon-chai": "^3.7.0",
|
||||
"typescript": "^5.0.4",
|
||||
"vitest": "^3.2.4"
|
||||
"vitest": "^4.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,6 @@
|
||||
"sinon-chai": "^3.7.0",
|
||||
"streamifier": "^0.1.1",
|
||||
"typescript": "^5.0.4",
|
||||
"vitest": "^3.2.4"
|
||||
"vitest": "^4.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,6 @@
|
||||
"chai-as-promised": "^7.1.1",
|
||||
"mocha": "^11.1.0",
|
||||
"typescript": "^5.0.4",
|
||||
"vitest": "^3.2.4"
|
||||
"vitest": "^4.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,24 +13,5 @@ fi
|
||||
|
||||
echo "Running unit tests in directory: $*"
|
||||
|
||||
npm run test:unit:parallel -- "${vitest_args[@]}"
|
||||
vitest_parallel_status=$?
|
||||
npm run test:unit -- "${vitest_args[@]}"
|
||||
|
||||
npm run test:unit:sequential -- "${vitest_args[@]}"
|
||||
vitest_sequential_status=$?
|
||||
|
||||
if [ "$vitest_sequential_status" -eq 0 ] && [ "$vitest_parallel_status" -eq 0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Report status briefly at the end for failures
|
||||
|
||||
if [ "$vitest_parallel_status" -ne 0 ]; then
|
||||
echo "Parallel tests failed with status: $vitest_parallel_status"
|
||||
fi
|
||||
|
||||
if [ "$vitest_sequential_status" -ne 0 ]; then
|
||||
echo "Sequential tests failed with status: $vitest_sequential_status"
|
||||
fi
|
||||
|
||||
exit 1
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
"test:unit:all": "npm run test:unit:run_dir -- test/unit/src modules/*/test/unit/src",
|
||||
"test:unit:all:silent": "npm run test:unit:all -- --reporter dot",
|
||||
"test:unit:app": "npm run test:unit:run_dir -- test/unit/src",
|
||||
"test:unit": "vitest run",
|
||||
"test:unit:parallel": "vitest run --project=Parallel",
|
||||
"test:unit:sequential": "vitest run --project=Sequential --no-file-parallelism",
|
||||
"test:unit:sequential": "vitest run --project=Sequential",
|
||||
"test:unit:watch": "vitest",
|
||||
"test:frontend": "NODE_ENV=test TZ=GMT mocha --recursive --timeout 5000 --exit --extension js,jsx,mjs,ts,tsx --grep=$MOCHA_GREP --require test/frontend/bootstrap.js --ignore '**/*.spec.{js,jsx,ts,tsx}' --ignore '**/helpers/**/*.{js,jsx,ts,tsx}' test/frontend modules/*/test/frontend",
|
||||
"test:frontend:coverage": "c8 --all --include 'frontend/js' --include 'modules/*/frontend/js' --exclude 'frontend/js/vendor' --reporter=lcov --reporter=text-summary npm run test:frontend",
|
||||
@@ -408,7 +409,7 @@
|
||||
"typescript": "^5.8.3",
|
||||
"use-stick-to-bottom": "^1.1.1",
|
||||
"uuid": "^9.0.1",
|
||||
"vitest": "^3.1.2",
|
||||
"vitest": "^4.0.0",
|
||||
"w3c-keyname": "^2.2.8",
|
||||
"webpack": "^5.98.0",
|
||||
"webpack-assets-manifest": "^5.2.1",
|
||||
|
||||
@@ -52,7 +52,7 @@ beforeEach(ctx => {
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
vi.restoreAllMocks()
|
||||
vi.resetAllMocks()
|
||||
vi.resetModules()
|
||||
sinon.restore()
|
||||
const modelNames = mongoose.modelNames()
|
||||
|
||||
@@ -79,7 +79,9 @@ describe('UserEmailsController', function () {
|
||||
consume: vi.fn().mockResolvedValue(undefined),
|
||||
}
|
||||
ctx.RateLimiter = {
|
||||
RateLimiter: vi.fn().mockReturnValue(ctx.rateLimiter),
|
||||
RateLimiter: vi.fn().mockImplementation(function RateLimiter() {
|
||||
this.consume = ctx.rateLimiter.consume
|
||||
}),
|
||||
}
|
||||
ctx.AuthenticationController = {
|
||||
getRedirectFromSession: vi.fn().mockReturnValue(null),
|
||||
|
||||
@@ -30,6 +30,9 @@ module.exports = defineConfig({
|
||||
'modules/*/test/unit/**/*.test.mjs',
|
||||
'test/unit/src/**/*.test.mjs',
|
||||
],
|
||||
sequence: {
|
||||
groupOrder: 2,
|
||||
},
|
||||
exclude: ['**/*.sequential.test.mjs'],
|
||||
fileParallelism: true,
|
||||
},
|
||||
@@ -38,6 +41,9 @@ module.exports = defineConfig({
|
||||
extends: true,
|
||||
test: {
|
||||
name: 'Sequential',
|
||||
sequence: {
|
||||
groupOrder: 1,
|
||||
},
|
||||
include: [
|
||||
'modules/*/test/unit/**/*.sequential.test.mjs',
|
||||
'test/unit/src/**/*.sequential.test.mjs',
|
||||
|
||||
Reference in New Issue
Block a user