Skip to content

Commit

Permalink
chore(hadron-build): fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gribnoysup committed Aug 21, 2024
1 parent 61dd3f1 commit 95b4f81
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
3 changes: 3 additions & 0 deletions packages/hadron-build/test/fixtures/hadron-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
"productName": "MongoDB Compass Enterprise super long test name",
"plugins": [],
"styles": [ "index" ]
},
"foo-bar": {
"name": "foo-bar"
}
},
"endpoint": "https://hadron-app.herokuapp.com",
Expand Down
26 changes: 0 additions & 26 deletions packages/hadron-build/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ describe('hadron-build', () => {
expect(hadronBuild).to.be.a('function');
});

describe('::release', () => {
it('should include options from commands::verify', () => {
expect(commands.release.builder).to.have.property('nodejs_version');
expect(commands.release.builder).to.have.property('npm_version');
});
});

describe('::test', () => {
const DEFAULT_ARGS = {
_: [],
Expand Down Expand Up @@ -84,23 +77,4 @@ describe('hadron-build', () => {
it('should spawn electron-mocha');
});
});

describe('::verify', () => {
it('should have a `nodejs_version` option', () => {
expect(commands.verify.builder).to.have.property('nodejs_version');
});

it('should have a `npm_version` option', () => {
expect(commands.verify.builder).to.have.property('npm_version');
});

it('should use `engines.node` for the default `nodejs_version` option');

it('should use `engines.npm` for the default `npm_version` option');

describe('::handler', () => {
it('should check the environment\'s npm installation');
it('should check the environment\'s node.js installation');
});
});
});
4 changes: 2 additions & 2 deletions packages/hadron-build/test/target.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('target', () => {

it('allows to override distribution config with env vars', () => {
Object.assign(process.env, {
HADRON_DISTRIBUTION: 'my-custom-distribution',
HADRON_DISTRIBUTION: 'foo-bar',
HADRON_PRODUCT: 'compass-compass',
HADRON_PRODUCT_NAME: 'MongoDB Compass My Awesome Edition',
HADRON_READONLY: 'true',
Expand All @@ -49,7 +49,7 @@ describe('target', () => {

const target = new Target(path.join(__dirname, 'fixtures', 'hadron-app'));

expect(target).to.have.property('distribution', 'my-custom-distribution');
expect(target).to.have.property('distribution', 'foo-bar');
expect(target).to.have.property('name', 'compass-compass');
expect(target).to.have.property(
'productName',
Expand Down

0 comments on commit 95b4f81

Please sign in to comment.