Added tests for helpers and components. All react components are now ES5.
This commit is contained in:
17
tests/components/Alert.react.jest.js
Normal file
17
tests/components/Alert.react.jest.js
Normal file
@@ -0,0 +1,17 @@
|
||||
jest.dontMock('../../assets/js/components/Alert.react.js');
|
||||
|
||||
describe('Wakatime', function() {
|
||||
var React, Alert, TestUtils, Component;
|
||||
|
||||
beforeEach(function() {
|
||||
// Setup our tools
|
||||
React = require('react/addons');
|
||||
Alert = require('../../assets/js/components/Alert.react.js');
|
||||
TestUtils = React.addons.TestUtils;
|
||||
// Create the React component here using TestUtils and store into Component
|
||||
});
|
||||
|
||||
it('should work', function() {
|
||||
expect(2 + 2).toEqual(4);
|
||||
});
|
||||
});
|
||||
17
tests/components/Options.react.jest.js
Normal file
17
tests/components/Options.react.jest.js
Normal file
@@ -0,0 +1,17 @@
|
||||
jest.dontMock('../../assets/js/components/Options.react.js');
|
||||
|
||||
describe('Wakatime', function() {
|
||||
var React, Options, TestUtils, Component;
|
||||
|
||||
beforeEach(function() {
|
||||
// Setup our tools
|
||||
React = require('react/addons');
|
||||
Options = require('../../assets/js/components/Options.react.js');
|
||||
TestUtils = React.addons.TestUtils;
|
||||
// Create the React component here using TestUtils and store into Component
|
||||
});
|
||||
|
||||
it('should work', function() {
|
||||
expect(2 + 2).toEqual(4);
|
||||
});
|
||||
});
|
||||
10
tests/helpers/changeExtensionState.spec.js
Normal file
10
tests/helpers/changeExtensionState.spec.js
Normal file
@@ -0,0 +1,10 @@
|
||||
var chai = require('chai');
|
||||
var expect = chai.expect;
|
||||
|
||||
import changeExtensionState from '../../assets/js/helpers/changeExtensionState';
|
||||
|
||||
describe('changeExtensionState', function() {
|
||||
it('should be a function', function() {
|
||||
expect(changeExtensionState).to.be.a('function');
|
||||
});
|
||||
});
|
||||
10
tests/helpers/changeExtensionTooltip.spec.js
Normal file
10
tests/helpers/changeExtensionTooltip.spec.js
Normal file
@@ -0,0 +1,10 @@
|
||||
var chai = require('chai');
|
||||
var expect = chai.expect;
|
||||
|
||||
import changeExtensionTooltip from '../../assets/js/helpers/changeExtensionTooltip';
|
||||
|
||||
describe('changeExtensionTooltip', function() {
|
||||
it('should be a function', function() {
|
||||
expect(changeExtensionTooltip).to.be.a('function');
|
||||
});
|
||||
});
|
||||
10
tests/helpers/getDomainFromUrl.spec.js
Normal file
10
tests/helpers/getDomainFromUrl.spec.js
Normal file
@@ -0,0 +1,10 @@
|
||||
var chai = require('chai');
|
||||
var expect = chai.expect;
|
||||
|
||||
import getDomainFromUrl from '../../assets/js/helpers/getDomainFromUrl';
|
||||
|
||||
describe('getDomainFromUrl', function() {
|
||||
it('should be a function', function() {
|
||||
expect(getDomainFromUrl).to.be.a('function');
|
||||
});
|
||||
});
|
||||
10
tests/helpers/in_array.spec.js
Normal file
10
tests/helpers/in_array.spec.js
Normal file
@@ -0,0 +1,10 @@
|
||||
var chai = require('chai');
|
||||
var expect = chai.expect;
|
||||
|
||||
import in_array from '../../assets/js/helpers/in_array';
|
||||
|
||||
describe('in_array', function() {
|
||||
it('should be a function', function() {
|
||||
expect(in_array).to.be.a('function');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user