summaryrefslogtreecommitdiff
path: root/web-ui/test
diff options
context:
space:
mode:
authorAnike Arni <aarni@thoughtworks.com>2017-02-01 18:00:08 -0200
committerAnike Arni <aarni@thoughtworks.com>2017-02-01 18:00:08 -0200
commitcaa8a4fcf7bf7ddd1c78f8c4e60088d72cecb717 (patch)
treefcb7bedfff05e08a854629decd36180582cc91c0 /web-ui/test
parent50efd8f59b814bc27e870ff3b09372b0d717b926 (diff)
[#922] Add react tests
with @tayanefernandes
Diffstat (limited to 'web-ui/test')
-rw-r--r--web-ui/test/jasmine.json9
-rw-r--r--web-ui/test/spec/account_recovery/account_recovery.spec.js11
-rw-r--r--web-ui/test/test-main.js2
3 files changed, 21 insertions, 1 deletions
diff --git a/web-ui/test/jasmine.json b/web-ui/test/jasmine.json
new file mode 100644
index 00000000..969304b6
--- /dev/null
+++ b/web-ui/test/jasmine.json
@@ -0,0 +1,9 @@
+{
+ "spec_dir": "test/spec/account_recovery/",
+ "spec_files": [
+ "**/*[sS]pec.js"
+ ],
+ "helpers": [
+ "helpers/**/*.js"
+ ]
+}
diff --git a/web-ui/test/spec/account_recovery/account_recovery.spec.js b/web-ui/test/spec/account_recovery/account_recovery.spec.js
new file mode 100644
index 00000000..d153f0eb
--- /dev/null
+++ b/web-ui/test/spec/account_recovery/account_recovery.spec.js
@@ -0,0 +1,11 @@
+import {shallow} from 'enzyme'
+import React from 'react'
+import Page from '../../../app/js/account_recovery/page'
+
+describe('test', () => {
+ 'use strict';
+ it('react', () => {
+ const page = shallow(<Page />);
+ expect(page.find('h1').text()).toEqual('Hello world');
+ });
+});
diff --git a/web-ui/test/test-main.js b/web-ui/test/test-main.js
index 4396993f..b7dc430f 100644
--- a/web-ui/test/test-main.js
+++ b/web-ui/test/test-main.js
@@ -1,7 +1,7 @@
var tests = Object.keys(window.__karma__.files).filter(function (file) {
'use strict';
- return (/\.spec\.js$/.test(file));
+ return !(/account_recovery/.test(file)) && (/\.spec\.js$/.test(file));
});
beforeEach(function() {