Skip to content

Commit

Permalink
chore: remove fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Nov 28, 2023
1 parent e97c693 commit 390e7ca
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 965 deletions.
7 changes: 0 additions & 7 deletions packages/upgrade/test/fixtures/basic/package.json

This file was deleted.

21 changes: 0 additions & 21 deletions packages/upgrade/test/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import fs from 'node:fs';
import { setStdout } from '../dist/index.js';
import stripAnsi from 'strip-ansi';

Expand Down Expand Up @@ -30,23 +29,3 @@ export function setup() {
},
};
}

const resetBasicFixture = async () => {
const packagePath = new URL('./fixtures/basic/package.json', import.meta.url);
const packageJsonData = JSON.parse(
await fs.promises.readFile(packagePath, { encoding: 'utf-8' })
);
const overriddenPackageJson = Object.assign(packageJsonData, {
dependencies: {
astro: '1.0.0',
},
});

return Promise.all([
fs.promises.writeFile(packagePath, JSON.stringify(overriddenPackageJson, null, 2), {
encoding: 'utf-8',
}),
]);
};

export const resetFixtures = () => Promise.allSettled([resetBasicFixture()]);
Loading

0 comments on commit 390e7ca

Please sign in to comment.