Skip to content

Commit f487f1b

Browse files
author
Anthony Du Pont
committed
🚧 Add Unit Test
1 parent fd30997 commit f487f1b

File tree

4 files changed

+187
-318
lines changed

4 files changed

+187
-318
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ Note that **Highway** uses modern features because we wanted it to be *modern*.
300300

301301
## Roadmap
302302

303-
- [ ] Unit Tests
303+
- [ ] More Unit Tests
304304
- [ ] More Examples
305305

306306
## Releases

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@
4242
"babel-preset-env": "^1.6.1",
4343
"chai": "^4.1.2",
4444
"chai-as-promised": "^7.1.1",
45-
"chai-fetch-mock": "^2.0.0",
4645
"compression-webpack-plugin": "^1.1.11",
47-
"fetch-mock": "^6.3.0",
4846
"isomorphic-fetch": "^2.2.1",
4947
"jsdom": "^11.7.0",
5048
"jsdom-global": "^3.0.2",

test/transition.tests.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,26 @@ import Highway from '../src/index';
1818
// DOM
1919
import Home from './dom/home';
2020

21-
// Transition instance
22-
const Transition = new Highway.Transition(Home.page);
23-
2421
// Assertions
2522
describe('Highway.Transition', () => {
2623
it('Should be an instance of `Highway.Transition`', () => {
24+
const Transition = new Highway.Transition(Home.page);
25+
2726
expect(Transition).to.be.instanceof(Highway.Transition);
2827
});
2928

3029
it('Should call `in` on `show`', () => {
30+
const Transition = new Highway.Transition(Home.page);
31+
3132
Transition.in = sinon.spy();
3233
Transition.show().then(() => {
3334
expect(Transition.in.calledOnce).to.equal(true);
3435
});
3536
});
3637

3738
it('Should call `out` on `hide`', () => {
39+
const Transition = new Highway.Transition(Home.page);
40+
3841
Transition.out = sinon.spy();
3942
Transition.hide().then(() => {
4043
expect(Transition.out.calledOnce).to.equal(true);

0 commit comments

Comments
 (0)