Skip to content

Commit 3069755

Browse files
committed
Migrate test/persistent-cache/* test files to Vitest
1 parent fcb9be0 commit 3069755

File tree

3 files changed

+3
-25
lines changed

3 files changed

+3
-25
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
"description": "Webpack Encore is a simpler way to integrate Webpack into your application",
55
"main": "index.js",
66
"scripts": {
7-
"test": "yarn run vitest && yarn run test:main && yarn run test:persistent-cache",
7+
"test": "yarn run vitest && yarn run test:main",
88
"test:main": "mocha --reporter spec test --recursive --ignore test/persistent-cache/*",
9-
"test:persistent-cache": "node run-persistent-tests",
109
"test:vitest": "vitest",
1110
"lint": "eslint lib test index.js .eslintrc.js --report-unused-disable-directives --max-warnings=0",
1211
"travis:lint": "yarn run lint"

run-persistent-tests.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

test/persistent-cache/functional.js renamed to test/persistent-cache/functional.test.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
const chai = require('chai');
12+
import { describe, it, expect, chai } from 'vitest';
1313
chai.use(require('chai-fs'));
1414
chai.use(require('chai-subset'));
1515
const path = require('path');
@@ -33,10 +33,7 @@ function createWebpackConfig(outputDirName = '', testName, command, argv = {}) {
3333
return webpackConfig;
3434
}
3535

36-
describe('Functional persistent cache tests using webpack', function() {
37-
// being functional tests, these can take quite long
38-
this.timeout(10000);
39-
36+
describe('Functional persistent cache tests using webpack', { repeats: 2, timeout: 10000 }, function() {
4037
describe('Basic scenarios.', () => {
4138
it('Persistent caching does not cause problems', (done) => {
4239
const config = createWebpackConfig('www/build', 'basic_cache', 'dev');

0 commit comments

Comments
 (0)