Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tborychowski committed Jul 27, 2024
1 parent 1b5b70d commit 3d18bb6
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
1 change: 0 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default [
globals: {
...globals.browser,
...globals.jest,
// ...globals.node,
}
},
rules: {
Expand Down
24 changes: 17 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@babel/preset-env": "^7.25.0",
"@esbuild-plugins/node-resolve": "^0.2.2",
"@eslint/js": "^9.8.0",
"@stylistic/eslint-plugin-js": "^2.3.0",
"@stylistic/eslint-plugin-js": "^2.4.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.4.8",
"@testing-library/svelte": "^5.2.1",
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ export function offsetLeft (el, value = 50) {
}

export function waitForTimeout (timeout) {
timeout = timeout || get(ANIMATION_SPEED) + 100;
timeout = typeof timeout === 'number' ? timeout : get(ANIMATION_SPEED) + 200;
return new Promise((resolve) => setTimeout(resolve, timeout));
}
2 changes: 1 addition & 1 deletion tests/utils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as utils from '../src/utils';


test('utils - matchMedia', () => {
expect(get(utils.ANIMATION_SPEED)).toStrictEqual(300);
expect(get(utils.ANIMATION_SPEED)).toStrictEqual(200);
});


Expand Down

0 comments on commit 3d18bb6

Please sign in to comment.