Skip to content

Commit

Permalink
add possible test
Browse files Browse the repository at this point in the history
  • Loading branch information
erikian committed Nov 13, 2022
1 parent 74e50e4 commit 7937934
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/api/core/test/fast/forge-config_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ describe('forge-config', () => {
expect(conf.defaultResolved).to.equal(true);
});

// @TODO make sure this test passes
it(`should resolve the yml config from forge.config.yml if it's specified in config.forge`, async () => {
type DefaultResolvedConfig = ResolvedForgeConfig;
const conf = (await findConfig(path.resolve(__dirname, '../fixture/dummy_ts_conf'))) as DefaultResolvedConfig;
expect(conf.buildIdentifier).to.equal('yml');
});

it('should resolve the TS file exports of forge.config.ts if config.forge does not exist and the TS config exists', async () => {
type DefaultResolvedConfig = ResolvedForgeConfig;
const conf = (await findConfig(path.resolve(__dirname, '../fixture/dummy_default_ts_conf'))) as DefaultResolvedConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
buildIdentifier: 'yml'
20 changes: 20 additions & 0 deletions packages/api/core/test/fixture/dummy_ts_conf/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "",
"productName": "",
"version": "1.0.0",
"description": "",
"main": "src/index.js",
"scripts": {
"start": "electron-forge start"
},
"keywords": [],
"author": "",
"license": "MIT",
"config": {
"forge": "./forge.config.yml"
},
"devDependencies": {
"@electron-forge/shared-types": "*",
"electron-prebuilt": "9.9.9"
}
}

0 comments on commit 7937934

Please sign in to comment.