Skip to content

Commit

Permalink
fix: add prepareConfig calls to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound committed Jun 27, 2018
1 parent 19e0543 commit 085c75d
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/api/core/test/fixture/maker-incompatible.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

export default class Maker {
// Just so the maker isn't excluded
platforms = [process.platform];

async lol() {
// lol
}
Expand Down
3 changes: 3 additions & 0 deletions packages/api/core/test/fixture/maker-unsupported.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
export default class Maker {
// Just so the maker isn't excluded
platforms = [process.platform];

isSupportedOnCurrentPlatform() {
return false;
}
Expand Down
1 change: 1 addition & 0 deletions packages/api/core/test/slow/api_spec_slow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ describe(`electron-forge API (with installer=${nodeInstaller})`, () => {
})
.map(makerPath => () => ({
name: makerPath,
platforms: [process.platform],
config: {
devCert,
},
Expand Down
1 change: 1 addition & 0 deletions packages/maker/deb/test/MakerDeb_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ describe('MakerDeb', () => {
createMaker = () => {
maker = new MakerDeb(config, []); // eslint-disable-line
maker.ensureFile = ensureFileStub;
maker.prepareConfig(targetArch as any);
};
createMaker();
});
Expand Down
1 change: 1 addition & 0 deletions packages/maker/dmg/test/MakerDMG_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ describe('MakerDMG', () => {
createMaker = () => {
maker = new MakerDMG(config);
maker.ensureFile = ensureFileStub;
maker.prepareConfig(targetArch as any);
};
createMaker();
});
Expand Down
1 change: 1 addition & 0 deletions packages/maker/flatpak/test/MakerFlatpak_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ describe('MakerFlatpak', () => {
createMaker = () => {
maker = new flatpakModule(config); // eslint-disable-line
maker.ensureDirectory = ensureDirectoryStub;
maker.prepareConfig(targetArch as any);
};
createMaker();
});
Expand Down
1 change: 1 addition & 0 deletions packages/maker/pkg/test/MakerPKG_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ describe('MakerPKG', () => {
createMaker = () => {
maker = new MakerDMG(config);
maker.ensureFile = ensureFileStub;
maker.prepareConfig(targetArch as any);
};
createMaker();
});
Expand Down
1 change: 1 addition & 0 deletions packages/maker/rpm/test/MakerRpm_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ describe('MakerRpm', () => {
createMaker = () => {
maker = new rpmModule(config); // eslint-disable-line
maker.ensureFile = ensureFileStub;
maker.prepareConfig(targetArch as any);
};
createMaker();
});
Expand Down
5 changes: 3 additions & 2 deletions packages/maker/snap/test/MakerSnap_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ describe('MakerSnap', () => {
createMaker = () => {
maker = new MakerSnapModule(config); // eslint-disable-line
maker.ensureDirectory = ensureDirectoryStub;
maker.prepareConfig(targetArch as any);
};
createMaker();
});
Expand All @@ -49,10 +50,10 @@ describe('MakerSnap', () => {
});

it('should have config cascade correctly', async () => {
config = {
Object.assign(config, {
arch: 'overridden',
description: 'Snap description',
} as any;
} as any);
createMaker();

await (maker.make as any)({ dir, makeDir, appName, targetArch, packageJSON });
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6778,7 +6778,7 @@ pretty-ms@^3.2.0:
dependencies:
parse-ms "^1.0.0"

private@^0.1.6, private@^0.1.8:
private@^0.1.6:
version "0.1.8"
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"

Expand Down

0 comments on commit 085c75d

Please sign in to comment.