testing suite established
This commit is contained in:
17
__tests__/components/MainList.react.jest.js
Normal file
17
__tests__/components/MainList.react.jest.js
Normal file
@@ -0,0 +1,17 @@
|
||||
jest.dontMock('../../assets/js/components/MainList.react.js');
|
||||
|
||||
describe('MainList', function() {
|
||||
var React, MainList, TestUtils, Component;
|
||||
|
||||
beforeEach(function() {
|
||||
// Setup our tools
|
||||
React = require('react/addons');
|
||||
MainList = require('../../assets/js/components/MainList.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/Navbar.react.jest.js
Normal file
17
__tests__/components/Navbar.react.jest.js
Normal file
@@ -0,0 +1,17 @@
|
||||
jest.dontMock('../../assets/js/components/Navbar.react.js');
|
||||
|
||||
describe('Navbar', function() {
|
||||
var React, Navbar, TestUtils, Component;
|
||||
|
||||
beforeEach(function() {
|
||||
// Setup our tools
|
||||
React = require('react/addons');
|
||||
Navbar = require('../../assets/js/components/Navbar.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/Wakatime.react.jest.js
Normal file
17
__tests__/components/Wakatime.react.jest.js
Normal file
@@ -0,0 +1,17 @@
|
||||
jest.dontMock('../../assets/js/components/Wakatime.react.js');
|
||||
|
||||
describe('Wakatime', function() {
|
||||
var React, Wakatime, TestUtils, Component;
|
||||
|
||||
beforeEach(function() {
|
||||
// Setup our tools
|
||||
React = require('react/addons');
|
||||
Wakatime = require('../../assets/js/components/Wakatime.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/changeExtensionIcon.spec.js
Normal file
10
__tests__/helpers/changeExtensionIcon.spec.js
Normal file
@@ -0,0 +1,10 @@
|
||||
var chai = require('chai');
|
||||
var expect = chai.expect;
|
||||
|
||||
import changeExtensionIcon from '../../assets/js/helpers/changeExtensionIcon';
|
||||
|
||||
describe('changeExtensionIcon', function() {
|
||||
it('should be a function', function() {
|
||||
expect(changeExtensionIcon).to.be.a('function');
|
||||
});
|
||||
});
|
||||
10
__tests__/helpers/currentTimestamp.spec.js
Normal file
10
__tests__/helpers/currentTimestamp.spec.js
Normal file
@@ -0,0 +1,10 @@
|
||||
var chai = require('chai');
|
||||
var expect = chai.expect;
|
||||
|
||||
import currentTimestamp from '../../assets/js/helpers/currentTimestamp';
|
||||
|
||||
describe('currentTimestamp', function() {
|
||||
it('should be a function', function() {
|
||||
expect(currentTimestamp).to.be.a('function');
|
||||
});
|
||||
});
|
||||
9
__tests__/preprocessor.js
Normal file
9
__tests__/preprocessor.js
Normal file
@@ -0,0 +1,9 @@
|
||||
// preprocessor.js
|
||||
var ReactTools = require('react-tools');
|
||||
var to5 = require('6to5-jest').process;
|
||||
|
||||
module.exports = {
|
||||
process: function(src, filename) {
|
||||
return ReactTools.transform(to5(src, filename));
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user