Skip to content

Commit d03cefb

Browse files
author
jonisaa
committed
Added dependencies for testing
Modified test createFactory
1 parent e8c117e commit d03cefb

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"coveralls": "^2.11.11",
5353
"cross-env": "^2.0.0",
5454
"css-loader": "^0.23.1",
55+
"enzyme": "^2.4.1",
5556
"express": "^4.14.0",
5657
"extract-text-webpack-plugin": "^1.0.1",
5758
"file-loader": "^0.9.0",
@@ -68,6 +69,8 @@
6869
"phantomjs-prebuilt": "^2.1.7",
6970
"raw-loader": "^0.5.1",
7071
"react-ace": "^3.4.1",
72+
"react-addons-test-utils": "^15.3.0",
73+
"react-dom": "^15.3.0",
7174
"react-hot-loader": "^1.3.0",
7275
"react-router": "^2.0.0",
7376
"react-router-redux": "^4.0.2",

test/createFactory.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { EditComponentFactory, DetailsComponentFactory } from '../src/index';
22
import { expect } from 'chai';
33

4-
54
describe("Factory creation", function() {
65
it("User requests an edit factory", function(done) {
76

@@ -17,9 +16,7 @@ describe("Factory creation", function() {
1716
'group': 'FieldGroup'
1817
};
1918

20-
let factory = EditComponentFactory;
21-
22-
expect(factory.defaultFieldComponents).to.be.deep.equal(correctConfig);
19+
expect(EditComponentFactory.defaultFieldComponents).to.be.deep.equal(correctConfig);
2320
done()
2421
});
2522

@@ -36,9 +33,7 @@ describe("Factory creation", function() {
3633
'group': 'FieldGroup'
3734
};
3835

39-
let factory = DetailsComponentFactory;
40-
41-
expect(factory.defaultFieldComponents).to.be.deep.equal(correctConfig);
36+
expect(DetailsComponentFactory.defaultFieldComponents).to.be.deep.equal(correctConfig);
4237
done()
4338
})
4439
});

0 commit comments

Comments
 (0)