moved to create-react-library

This commit is contained in:
unknown committed 2020-08-05 08:14:22 +03:00
1 parent d27d58d44c
commit 09520361c2
65 files changed
+40755 -16260

No files matched your search

+16 -16
View File
@@ -2,11 +2,11 @@ import {
seedDates,
addToDate,
getWeekNumberISO8601,
} from '../src/helpers/date-helper';
import { ViewMode } from '../src/types/public-types';
} from "../helpers/date-helper";
import { ViewMode } from "../types/public-types";
describe('seed date', () => {
test('daily', () => {
describe("seed date", () => {
test("daily", () => {
expect(
seedDates(new Date(2020, 5, 28), new Date(2020, 6, 2), ViewMode.Day)
).toEqual([
@@ -18,7 +18,7 @@ describe('seed date', () => {
]);
});
test('weekly', () => {
test("weekly", () => {
expect(
seedDates(new Date(2020, 5, 28), new Date(2020, 6, 19), ViewMode.Week)
).toEqual([
@@ -29,13 +29,13 @@ describe('seed date', () => {
]);
});
test('monthly', () => {
test("monthly", () => {
expect(
seedDates(new Date(2020, 5, 28), new Date(2020, 6, 19), ViewMode.Month)
).toEqual([new Date(2020, 5, 28), new Date(2020, 6, 28)]);
});
test('quarterly', () => {
test("quarterly", () => {
expect(
seedDates(
new Date(2020, 5, 28),
@@ -52,22 +52,22 @@ describe('seed date', () => {
});
});
describe('add to date', () => {
test('add month', () => {
expect(addToDate(new Date(2020, 0, 1), 40, 'month')).toEqual(
describe("add to date", () => {
test("add month", () => {
expect(addToDate(new Date(2020, 0, 1), 40, "month")).toEqual(
new Date(2023, 4, 1)
);
});
test('add day', () => {
expect(addToDate(new Date(2020, 0, 1), 40, 'day')).toEqual(
test("add day", () => {
expect(addToDate(new Date(2020, 0, 1), 40, "day")).toEqual(
new Date(2020, 1, 10)
);
});
});
test('get week number', () => {
expect(getWeekNumberISO8601(new Date(2019, 11, 31))).toEqual('01');
expect(getWeekNumberISO8601(new Date(2021, 0, 1))).toEqual('53');
expect(getWeekNumberISO8601(new Date(2020, 6, 20))).toEqual('30');
test("get week number", () => {
expect(getWeekNumberISO8601(new Date(2019, 11, 31))).toEqual("01");
expect(getWeekNumberISO8601(new Date(2021, 0, 1))).toEqual("53");
expect(getWeekNumberISO8601(new Date(2020, 6, 20))).toEqual("30");
});
+8 -8
View File
@@ -1,18 +1,18 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { Gantt } from '../src/index';
import React from "react";
import ReactDOM from "react-dom";
import { Gantt } from "../index";
describe('gantt', () => {
it('renders without crashing', () => {
const div = document.createElement('div');
describe("gantt", () => {
it("renders without crashing", () => {
const div = document.createElement("div");
ReactDOM.render(
<Gantt
tasks={[
{
start: new Date(2020, 0, 1),
end: new Date(2020, 2, 2),
name: 'Redesign website',
id: 'Task 0',
name: "Redesign website",
id: "Task 0",
progress: 45,
},
]}