2018-12-23 03:13:56 +03:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
|
|
|
exports[`TestGenerator component should be empty when no actions provided 1`] = `
|
|
|
|
<textarea
|
2019-01-02 02:07:16 +03:00
|
|
|
style="padding:10px;width:100%;height:100%"
|
2018-12-23 03:13:56 +03:00
|
|
|
/>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`TestGenerator component should generate test for the last action when selectedActionId not specified 1`] = `
|
|
|
|
<textarea
|
2019-01-02 02:07:16 +03:00
|
|
|
style="padding:10px;width:100%;height:100%"
|
2018-12-23 03:13:56 +03:00
|
|
|
>
|
|
|
|
import expect from 'expect';
|
|
|
|
import reducers from '../../reducers';
|
|
|
|
|
|
|
|
describe('reducers', () => {
|
|
|
|
it('should handle actions', () => {
|
|
|
|
let state;
|
|
|
|
state = reducers({counter:0}, {type:'INCREMENT_COUNTER'});
|
|
|
|
expect(state).toEqual({counter:1});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
</textarea>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`TestGenerator component should generate test for vanilla js class 1`] = `
|
|
|
|
<textarea
|
2019-01-02 02:07:16 +03:00
|
|
|
style="padding:10px;width:100%;height:100%"
|
2018-12-23 03:13:56 +03:00
|
|
|
>
|
|
|
|
import expect from 'expect';
|
|
|
|
import SomeStore from '../../stores/SomeStore';
|
|
|
|
|
|
|
|
describe('SomeStore', () => {
|
|
|
|
it('INCREMENT_COUNTER', () => {
|
|
|
|
const store = new SomeStore({counter:0});
|
|
|
|
INCREMENT_COUNTER();
|
|
|
|
expect(store.counter).toEqual(1);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
</textarea>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`TestGenerator component should generate test for vanilla js class with string template 1`] = `
|
|
|
|
<textarea
|
2019-01-02 02:07:16 +03:00
|
|
|
style="padding:10px;width:100%;height:100%"
|
2018-12-23 03:13:56 +03:00
|
|
|
>
|
|
|
|
import expect from 'expect';
|
|
|
|
import SomeStore from '../../stores/SomeStore';
|
|
|
|
|
|
|
|
describe('SomeStore', () => {
|
|
|
|
it('INCREMENT_COUNTER', () => {
|
|
|
|
const store = new SomeStore({counter:0});
|
|
|
|
INCREMENT_COUNTER();
|
|
|
|
expect(store.counter).toEqual(1);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
</textarea>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`TestGenerator component should match function template's test for first action 1`] = `
|
|
|
|
<textarea
|
2019-01-02 02:07:16 +03:00
|
|
|
style="padding:10px;width:100%;height:100%"
|
2018-12-23 03:13:56 +03:00
|
|
|
>
|
|
|
|
import expect from 'expect';
|
|
|
|
import reducers from '../../reducers';
|
|
|
|
|
|
|
|
describe('reducers', () => {
|
|
|
|
it('should handle actions', () => {
|
|
|
|
let state;
|
|
|
|
state = reducers({counter:0}, {type:'INCREMENT_COUNTER'});
|
|
|
|
expect(state).toEqual({counter:1});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
</textarea>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`TestGenerator component should match string template's test for first action 1`] = `
|
|
|
|
<textarea
|
2019-01-02 02:07:16 +03:00
|
|
|
style="padding:10px;width:100%;height:100%"
|
2018-12-23 03:13:56 +03:00
|
|
|
>
|
|
|
|
import expect from 'expect';
|
|
|
|
import reducers from '../../reducers';
|
|
|
|
|
|
|
|
describe('reducers', () => {
|
|
|
|
it('should handle actions', () => {
|
|
|
|
let state;
|
|
|
|
state = reducers({counter:0}, {type:'INCREMENT_COUNTER'});
|
|
|
|
expect(state).toEqual({counter:1});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
</textarea>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`TestGenerator component should show warning message when no params provided 1`] = `
|
|
|
|
<textarea
|
2019-01-02 02:07:16 +03:00
|
|
|
style="padding:10px;width:100%;height:100%"
|
2018-12-23 03:13:56 +03:00
|
|
|
/>
|
|
|
|
`;
|