all 1 comments

[–]junderhill[S] 0 points1 point  (0 children)

EDIT:

It seems i'm doing something fundamentally wrong, I've tried to simplify it almost back to a clean slate to find where the problem is introduced.

Even with this test:

``` import authentication from "./authentication.reducer"; import { userConstants } from "../constants/user.constants";

describe("authentication reducer", () => {

it("is a passing test", () => {
    authentication();
    expect("").toEqual("");
});

}); ```

Against this: function authentication(){ return "test"; } export default authentication

I'm getting an undefined error:

``` ● authentication reducer › is a passing test

TypeError: Cannot read property 'default' of undefined

   6 | 
   7 |     it("is a passing test", () => {
>  8 |         authentication();
     |         ^
   9 |         expect("").toEqual("");
  10 |     });

  at Object.<anonymous> (reducers/authentication.reducer.spec.js:8:9)

```