This repository has been archived by the owner on Nov 15, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fine tuned babel config + added first jest test to test redux store c…
…reation.
- Loading branch information
Showing
3 changed files
with
42 additions
and
7 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,9 +1,18 @@ | ||
{ | ||
presets: [ "env" ], | ||
|
||
plugins: [ | ||
[ "module-resolver", { | ||
root: [ "src" ] | ||
}] | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"targets": { | ||
"node": "6", | ||
"browsers": "last 2 versions" | ||
}, | ||
"useBuiltIns": true | ||
} | ||
] | ||
], | ||
"plugins": [ | ||
[ "module-resolver", { "root": [ "src" ] }], | ||
[ "transform-object-rest-spread", { "useBuiltIns": true }] | ||
] | ||
} |
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,24 @@ | ||
import { createReduxStore } from "./State" | ||
|
||
test("Create Redux Store - Basic", () => { | ||
const reducers = {} | ||
const middlewares = [] | ||
const enhancers = [] | ||
|
||
expect(createReduxStore({ reducers, middlewares, enhancers })).toBeDefined() | ||
}) | ||
|
||
test("Create Redux Store - No Reducers", () => { | ||
const middlewares = [] | ||
const enhancers = [] | ||
|
||
expect(createReduxStore({ middlewares, enhancers })).toBeDefined() | ||
}) | ||
|
||
test("Create Redux Store - Empty Param", () => { | ||
expect(createReduxStore({ })).toBeDefined() | ||
}) | ||
|
||
test("Create Redux Store - No Params", () => { | ||
expect(createReduxStore()).toBeDefined() | ||
}) |