Skip to content

Commit

Permalink
Fixes for failing tests on master
Browse files Browse the repository at this point in the history
  • Loading branch information
emmacasolin committed Feb 25, 2022
1 parent ff8e0cb commit e261da0
Show file tree
Hide file tree
Showing 4 changed files with 804 additions and 485 deletions.
4 changes: 2 additions & 2 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function arrayUnset<T>(items: Array<T>, item: T) {

function debounce<P extends any[]>(
f: (...params: P) => any,
timeout: number = 0
timeout: number = 0,
): (...param: P) => void {
let timer: ReturnType<typeof setTimeout>;
return function (this: any, ...args: any[]) {
Expand All @@ -231,5 +231,5 @@ export {
timerStop,
arraySet,
arrayUnset,
debounce
debounce,
};
6 changes: 3 additions & 3 deletions tests/bin/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('bin/utils', () => {
type: 'json',
data: ['Testing', 'the', 'list', 'output'],
}),
).toBe('["Testing","the","list","output"]');
).toBe('["Testing","the","list","output"]\n');
});
test('table in human and in json format', () => {
// Table
Expand All @@ -38,7 +38,7 @@ describe('bin/utils', () => {
],
}),
).toBe(
'[{"key1":"value1","key2":"value2"},{"key1":"data1","key2":"data2"}]',
'[{"key1":"value1","key2":"value2"},{"key1":"data1","key2":"data2"}]\n',
);
});
test('dict in human and in json format', () => {
Expand All @@ -61,6 +61,6 @@ describe('bin/utils', () => {
type: 'json',
data: { key1: 'value1', key2: 'value2' },
}),
).toBe('{"key1":"value1","key2":"value2"}');
).toBe('{"key1":"value1","key2":"value2"}\n');
});
});
Loading

0 comments on commit e261da0

Please sign in to comment.