Skip to content

Commit

Permalink
Fix failing tests on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
TwitchBronBron committed Mar 11, 2024
1 parent b485ea4 commit 7ad7ff0
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/util.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,12 +452,8 @@ describe('util', () => {
});

describe('getOptionsFromJson', () => {
beforeEach(() => {
fsExtra.ensureDirSync(rootDir);
process.chdir(rootDir);
});
it('should fill in options from rokudeploy.json', () => {
fsExtra.writeJsonSync(s`${rootDir}/rokudeploy.json`, { password: 'password' });
fsExtra.outputJsonSync(s`${rootDir}/rokudeploy.json`, { password: 'password' });
expect(
util.getOptionsFromJson({ cwd: rootDir })
).to.eql({
Expand All @@ -467,7 +463,7 @@ describe('util', () => {

it(`loads cwd from process`, () => {
try {
fsExtra.writeJsonSync(s`${process.cwd()}/rokudeploy.json`, { host: '1.2.3.4' });
fsExtra.outputJsonSync(s`${process.cwd()}/rokudeploy.json`, { host: '1.2.3.4' });
expect(
util.getOptionsFromJson()
).to.eql({
Expand All @@ -476,7 +472,6 @@ describe('util', () => {
} finally {
fsExtra.removeSync(s`${process.cwd()}/rokudeploy.json`);
}

});

it('catches invalid json with jsonc parser', () => {
Expand Down

0 comments on commit 7ad7ff0

Please sign in to comment.