Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andriyor committed Jan 6, 2024
1 parent fbf01ec commit 08d8f05
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test/test.test.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
import fs from 'fs';
import fs from 'node:fs';
import childProcess from 'node:child_process';
import util from 'node:util';

import { beforeAll, describe, it, expect } from 'vitest'
import { beforeAll, describe, it, expect, afterAll } from 'vitest'

import { migrateToNamedExport } from '../src';

import { prepareTestCases } from './helper';
// fs.cpSync('example', 'example-untouched', {recursive: true});

const exec = util.promisify(childProcess.exec);

beforeAll(async () => {
await migrateToNamedExport({
projectFiles: 'test/test-project/**/*.{tsx,ts}'
});
});

afterAll(async () => {
await exec('git stash push -- test/test-project');
});

describe('default-export', () => {
const testCases = prepareTestCases();
it.each(testCases)(
Expand Down

0 comments on commit 08d8f05

Please sign in to comment.