Код: Выделить всё
import fs from 'node:fs';
describe('Description of test file 1', () => {
test('Test on file1', () => {
expect(true).toBeTruthy();
// run the code to create result file.
// test that result file.
});
});
Код: Выделить всё
import fs from 'node:fs';
describe('Description of test file 2', () => {
test('Test on file2', () => {
expect(false).toBeFalsy();
// use result file from file1.test to do another tests
// after end of tests in this file (file2.test) I can use after to delete file.
});
});
Я хочу убедиться, что file2.test.mjs выполняется после file1.test.mjs .>
Подробнее здесь: https://stackoverflow.com/questions/797 ... other-test