globalbridge-lsf-custom
Version:
GlobalBridge in-house labeling tool, originating from LSF.
39 lines (29 loc) • 865 B
JavaScript
/* global test, expect */
import TaskStore from '../TaskStore';
test('Task Store with string', () => {
const initialState = {
id: 1,
data: '{"url": "https://heartex.net"}',
project: 100,
};
const taskStore = TaskStore.create(initialState);
expect(taskStore.dataObj).toEqual({ url: 'https://heartex.net' });
});
// test("Task Store JSON", () => {
// const initialState = {
// id: 1,
// data: {url: "https://heartex.net"},
// project: 100,
// };
// const taskStore = TaskStore.create(initialState);
// expect(taskStore.dataObj).toEqual({ url: "https://heartex.net" });
// })
// test("Task Store bad value", () => {
// const initialState = {
// id: 1,
// data: "Not JSON",
// project: 100,
// };
// const taskStore = TaskStore.create(initialState);
// expect(taskStore.dataObj).toEqual(null);
// })