Skip to content

Commit

Permalink
Try to make Windows happy about the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
benjervis committed Apr 26, 2024
1 parent 9809e9e commit ab749c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/integration-tests/test/api.js
Expand Up @@ -62,7 +62,6 @@ describe('JS API', function () {
describe('Reporter API', () => {
it('should pass the parcel version to plugins', async () => {
const dir = path.join(__dirname, 'plugin-parcel-version');
const versionFileLocation = path.join(dir, 'parcel-version.txt');

overlayFS.mkdirp(dir);

Expand All @@ -85,11 +84,12 @@ describe('JS API', function () {
reporter-plugin.js:
import {Reporter} from '@parcel/plugin';
import path from 'node:path';
export default new Reporter({
async report({event, options}) {
if (event.type === 'buildSuccess') {
await options.outputFS.writeFile("${versionFileLocation}", options.parcelVersion);
await options.outputFS.writeFile(path.join(options.projectRoot, 'parcel-version.txt'), options.parcelVersion);
}
}
})
Expand All @@ -101,7 +101,7 @@ describe('JS API', function () {
});

assert.equal(
await overlayFS.readFile(versionFileLocation),
await overlayFS.readFile(path.join(dir, 'parcel-version.txt')),
PARCEL_VERSION,
);
});
Expand Down

0 comments on commit ab749c5

Please sign in to comment.