Browse Source

wallaby works again

Daniel Zlotin 7 years ago
parent
commit
a8f369ab48
3 changed files with 19 additions and 0 deletions
  1. 4
    0
      src2/index.js
  2. 14
    0
      src2/index.test.js
  3. 1
    0
      wallaby.js

+ 4
- 0
src2/index.js View File

@@ -0,0 +1,4 @@
1
+import * as NavigationInner from './Navigation';
2
+
3
+export default NavigationInner;
4
+export const Navigation = NavigationInner;

+ 14
- 0
src2/index.test.js View File

@@ -0,0 +1,14 @@
1
+describe('index', () => {
2
+  let uut;
3
+
4
+  beforeEach(() => {
5
+    uut = require('./index');
6
+  });
7
+
8
+  it('exposes Navigation as default or as Object', () => {
9
+    expect(uut.Navigation).toBeDefined();
10
+    expect(uut.Navigation).toEqual(uut.default);
11
+    expect(uut.Navigation.startApp).toBeInstanceOf(Function);
12
+    expect(uut.default.startApp).toBeInstanceOf(Function);
13
+  });
14
+});

+ 1
- 0
wallaby.js View File

@@ -1,5 +1,6 @@
1 1
 /*eslint-disable*/
2 2
 'use strict';
3
+process.env.BABEL_ENV = 'test';
3 4
 const babelOptions = require('./package.json').babel.env.test;
4 5
 module.exports = function(wallaby) {
5 6
   return {