-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependencies and enforce electron version checking when instal…
…ling extensions. Fixes #8
- Loading branch information
1 parent
1d5136d
commit 69f21fc
Showing
6 changed files
with
103 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
{ | ||
"extends": "airbnb-base", | ||
"rules": { | ||
"consistent-return": 0, | ||
"import/no-unresolved": 0, | ||
"consistent-return": 0 | ||
"max-len": [2, 170], | ||
"import/prefer-default-export": 0, | ||
"import/no-extraneous-dependencies": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Pre-run | ||
import chai from 'chai'; | ||
import chaiAsPromised from 'chai-as-promised'; | ||
|
||
// Actual Test Imports | ||
import installExtension, { REACT_DEVELOPER_TOOLS } from '../src/'; | ||
|
||
chai.use(chaiAsPromised); | ||
chai.should(); | ||
|
||
describe('Extension Compatability Checker', () => { | ||
let currentVersion; | ||
|
||
beforeEach(() => { | ||
currentVersion = process.versions.electron; | ||
}); | ||
|
||
describe('when using a compatable version of electron', () => { | ||
it('should resolve the promise', () => | ||
installExtension(REACT_DEVELOPER_TOOLS).should.be.fulfilled | ||
); | ||
}); | ||
|
||
describe('when using an incompatable version of electron', () => { | ||
it('should reject the promise', () => { | ||
process.versions.electron = '0.37.2'; | ||
return installExtension(REACT_DEVELOPER_TOOLS).should.be.rejected; | ||
}); | ||
}); | ||
|
||
afterEach(() => { | ||
process.versions.electron = currentVersion; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters