This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { describe, it, expect } from 'vitest';
|
|
||||||
import { grid } from '$lib/graph-templates/grid';
|
import { grid } from '$lib/graph-templates/grid';
|
||||||
import { tree } from '$lib/graph-templates/tree';
|
import { tree } from '$lib/graph-templates/tree';
|
||||||
|
import { describe, expect, it } from 'vitest';
|
||||||
|
|
||||||
describe('graph-templates', () => {
|
describe('graph-templates', () => {
|
||||||
describe('grid', () => {
|
describe('grid', () => {
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
import { describe, it, expect } from 'vitest';
|
import { clone, debounce, humanizeDuration, humanizeNumber, lerp, snapToGrid } from '$lib/helpers';
|
||||||
import {
|
import { describe, expect, it } from 'vitest';
|
||||||
snapToGrid,
|
|
||||||
lerp,
|
|
||||||
humanizeNumber,
|
|
||||||
humanizeDuration,
|
|
||||||
debounce,
|
|
||||||
clone
|
|
||||||
} from '$lib/helpers';
|
|
||||||
|
|
||||||
describe('helpers', () => {
|
describe('helpers', () => {
|
||||||
describe('snapToGrid', () => {
|
describe('snapToGrid', () => {
|
||||||
@@ -112,7 +105,9 @@ describe('helpers', () => {
|
|||||||
|
|
||||||
it('should only call once when invoked multiple times within delay', () => {
|
it('should only call once when invoked multiple times within delay', () => {
|
||||||
let callCount = 0;
|
let callCount = 0;
|
||||||
const fn = debounce(() => { callCount++; }, 100);
|
const fn = debounce(() => {
|
||||||
|
callCount++;
|
||||||
|
}, 100);
|
||||||
fn();
|
fn();
|
||||||
const firstCall = callCount;
|
const firstCall = callCount;
|
||||||
fn();
|
fn();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { describe, it, expect } from 'vitest';
|
import { isObject, mergeDeep } from '$lib/helpers/deepMerge';
|
||||||
import { mergeDeep, isObject } from '$lib/helpers/deepMerge';
|
import { describe, expect, it } from 'vitest';
|
||||||
|
|
||||||
describe('deepMerge', () => {
|
describe('deepMerge', () => {
|
||||||
describe('isObject', () => {
|
describe('isObject', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user