From caa8a4fcf7bf7ddd1c78f8c4e60088d72cecb717 Mon Sep 17 00:00:00 2001 From: Anike Arni Date: Wed, 1 Feb 2017 18:00:08 -0200 Subject: [#922] Add react tests with @tayanefernandes --- web-ui/test/jasmine.json | 9 +++++++++ web-ui/test/spec/account_recovery/account_recovery.spec.js | 11 +++++++++++ web-ui/test/test-main.js | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 web-ui/test/jasmine.json create mode 100644 web-ui/test/spec/account_recovery/account_recovery.spec.js (limited to 'web-ui/test') 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(); + 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() { -- cgit v1.2.3