-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #184 from ericblade/dev
chore: add tests for import/require in node (fix #119)
- Loading branch information
Showing
9 changed files
with
583 additions
and
316 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,16 @@ | ||
import * as Mocha from 'mocha'; | ||
const { describe, it } = Mocha.default; | ||
import * as Chai from 'chai'; | ||
const { expect } = Chai.default; | ||
import Q from '../lib/quagga.js'; | ||
|
||
describe('testing node import', () => { | ||
it('import works', () => { | ||
expect(Q).to.be.an('object'); | ||
expect(Q.init).to.be.a('function'); | ||
expect(Q.start).to.be.a('function'); | ||
expect(Q.stop).to.be.a('function'); | ||
}); | ||
}); | ||
|
||
// export default 1; |
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,20 @@ | ||
const { describe, it } = require('mocha'); | ||
const { expect } = require('chai'); | ||
|
||
const Q = require('..'); | ||
const Q2 = require('..').default; | ||
|
||
describe('testing node require', () => { | ||
it('require works', () => { | ||
expect(Q).to.be.an('object'); | ||
expect(Q.init).to.be.a('function'); | ||
expect(Q.start).to.be.a('function'); | ||
expect(Q.stop).to.be.a('function'); | ||
}); | ||
it('require default works', () => { | ||
expect(Q2).to.be.an('object'); | ||
expect(Q.init).to.be.a('function'); | ||
expect(Q.start).to.be.a('function'); | ||
expect(Q.stop).to.be.a('function'); | ||
}); | ||
}); |