Skip to content

Commit

Permalink
test(new): add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaEvo committed May 21, 2018
1 parent 5b7a4a2 commit b820e5f
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/integration-test/src/Export/All/All.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './Lib.js'
14 changes: 14 additions & 0 deletions test/integration-test/src/Export/All/All.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import assert from 'assert';
import {find} from '../../../util';

describe('test/Export/All/All:', ()=>{
it('re exported all the exports', ()=>{
const doc1 = find('longname', 'src/Export/All/All.js~a');
const doc2 = find('longname', 'src/Export/All/All.js~b');
const doc3 = find('longname', 'src/Export/All/All.js~c');

assert.equal(doc1.export, true);
assert.equal(doc2.export, true);
assert.equal(doc3.export, true);
})
});
3 changes: 3 additions & 0 deletions test/integration-test/src/Export/All/Lib.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const a = 1;
export const b = 2;
export const c = 3;
10 changes: 10 additions & 0 deletions test/integration-test/src/Export/Reexport/Lib.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const a = 1;
const b = 2;
const c = 3;
const d = 4;
export {
a,
b,
c
};
export default d;
8 changes: 8 additions & 0 deletions test/integration-test/src/Export/Reexport/Reexport.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import d, { a, b, c } from './Lib.js'

export {
a,
b,
c,
d
}
16 changes: 16 additions & 0 deletions test/integration-test/src/Export/Reexport/Reexport.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import assert from 'assert';
import {find} from '../../../util';

describe('test/Export/Reexport/Reexport:', ()=>{
it('re exported all the exports', ()=>{
const doc1 = find('longname', 'src/Export/Reexport/Reexport.js~a');
const doc2 = find('longname', 'src/Export/Reexport/Reexport.js~b');
const doc3 = find('longname', 'src/Export/Reexport/Reexport.js~c');
const doc4 = find('longname', 'src/Export/Reexport/Reexport.js~d');

assert.equal(doc1.export, true);
assert.equal(doc2.export, true);
assert.equal(doc3.export, true);
assert.equal(doc4.export, true);
})
});

0 comments on commit b820e5f

Please sign in to comment.