Skip to content

Commit

Permalink
test: use memdisk
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Aug 15, 2024
1 parent 52fb6c6 commit 7d355ed
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 77 deletions.
63 changes: 60 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"eslint-config-sukka": "^4.1.10",
"eslint-formatter-sukka": "^4.1.10",
"fdir": "^6.2.0",
"memdisk": "^1.0.2",
"mocha": "^10.4.0",
"mocha-chai-jest-snapshot": "^1.1.4",
"picocolors": "^1.0.0",
Expand Down
6 changes: 3 additions & 3 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type { JsMinifyOptions } from '@swc/core';
import chai from 'chai';
import { jestSnapshotPlugin } from 'mocha-chai-jest-snapshot';

import { cleanup, init } from './ramdisk';
import { create, destroy } from 'memdisk';

import { async as ezspawn } from '@jsdevtools/ez-spawn';

Expand Down Expand Up @@ -377,7 +377,7 @@ const tests = (rollupImpl: typeof rollup2 | typeof rollup3 | typeof rollup4, iso
};

describe('rollup-plugin-swc3', () => {
const ramDiskPath = init('rolluppluginswc3test');
const ramDiskPath = create.sync('rolluppluginswc3test', 64 * 1024 * 1024);

describe('swc (rollup 2)', () => {
const isolateDir = path.join(ramDiskPath, 'rollup2');
Expand All @@ -394,5 +394,5 @@ describe('rollup-plugin-swc3', () => {
tests(rollup4, isolateDir);
});

after(() => cleanup(ramDiskPath));
after(() => destroy.sync(ramDiskPath));
});
71 changes: 0 additions & 71 deletions test/ramdisk.ts

This file was deleted.

0 comments on commit 7d355ed

Please sign in to comment.