git.fiddlerwoaroof.com
Browse code

move tests to their own directory

Ed Langley authored on 14/05/2019 00:58:30
Showing 7 changed files
1 1
similarity index 100%
2 2
rename from src/__snapshots__/action-link.test.js.snap
3 3
rename to src/tests/__snapshots__/action-link.test.js.snap
4 4
similarity index 100%
5 5
rename from src/__snapshots__/fragment.test.js.snap
6 6
rename to src/tests/__snapshots__/fragment.test.js.snap
7 7
similarity index 97%
8 8
rename from src/action-link.test.js
9 9
rename to src/tests/action-link.test.js
... ...
@@ -1,4 +1,4 @@
1
-import ActionLink from "./action-link";
1
+import ActionLink from "../action-link";
2 2
 import { mount } from "enzyme";
3 3
 import ezJson from "enzyme-to-json";
4 4
 import Enzyme from "enzyme";
5 5
similarity index 98%
6 6
rename from src/action-router.test.js
7 7
rename to src/tests/action-router.test.js
... ...
@@ -1,8 +1,8 @@
1 1
 import { createStore } from "redux";
2 2
 
3
-import installBrowserRouter from "./action-router";
4
-import addChangeUrlEvent from "./change-url-event.js";
5
-import addMissingHistoryEvents from "./history-events.js";
3
+import installBrowserRouter from "../action-router";
4
+import addChangeUrlEvent from "../change-url-event.js";
5
+import addMissingHistoryEvents from "../history-events.js";
6 6
 
7 7
 const console_log = console.log;
8 8
 console.log = () => {};
9 9
similarity index 97%
10 10
rename from src/change-url-event.test.js
11 11
rename to src/tests/change-url-event.test.js
... ...
@@ -1,4 +1,4 @@
1
-import addChangeUrlEvent from "./change-url-event";
1
+import addChangeUrlEvent from "../change-url-event";
2 2
 
3 3
 it("it should add changeUrlEventCreator to popstate,pushstate,replacestate", () => {
4 4
   // given
5 5
similarity index 97%
6 6
rename from src/fragment.test.js
7 7
rename to src/tests/fragment.test.js
... ...
@@ -1,5 +1,5 @@
1 1
 import React from "react";
2
-import Fragment from "./fragment";
2
+import Fragment from "../fragment";
3 3
 import ezJson from "enzyme-to-json";
4 4
 import { shallow } from "enzyme";
5 5
 import Enzyme from "enzyme";
6 6
similarity index 97%
7 7
rename from src/history-events.test.js
8 8
rename to src/tests/history-events.test.js
... ...
@@ -1,4 +1,4 @@
1
-import addMissingHistoryEvents from "./history-events";
1
+import addMissingHistoryEvents from "../history-events";
2 2
 
3 3
 it("should overwrite pushstate and replacestate with event-emitting functions", () => {
4 4
   // given