@testing-library/svelte
Advanced tools
Comparing version 4.0.6 to 4.1.0
{ | ||
"name": "@testing-library/svelte", | ||
"version": "4.0.6", | ||
"version": "4.1.0", | ||
"description": "Simple and complete Svelte testing utilities that encourage good testing practices.", | ||
@@ -10,2 +10,5 @@ "main": "src/index.js", | ||
"default": "./src/index.js" | ||
}, | ||
"./vitest": { | ||
"default": "./src/vitest.js" | ||
} | ||
@@ -45,6 +48,7 @@ }, | ||
"toc": "doctoc README.md", | ||
"lint": "eslint src --fix", | ||
"test": "vitest run src", | ||
"test:watch": "npm run test -- --watch", | ||
"test:update": "npm run test -- --updateSnapshot --coverage", | ||
"lint": "(prettier . --check || true) && eslint .", | ||
"format": "prettier . --write && eslint . --fix", | ||
"test": "vitest run --coverage", | ||
"test:watch": "vitest", | ||
"test:update": "vitest run --update", | ||
"setup": "npm install && npm run validate", | ||
@@ -65,7 +69,10 @@ "validate": "npm-run-all lint test", | ||
"@sveltejs/vite-plugin-svelte": "^2.4.2", | ||
"@testing-library/jest-dom": "^5.16.5", | ||
"@vitest/coverage-c8": "^0.33.0", | ||
"@testing-library/jest-dom": "^6.3.0", | ||
"@typescript-eslint/eslint-plugin": "^6.19.1", | ||
"@typescript-eslint/parser": "^6.19.1", | ||
"@vitest/coverage-v8": "^0.33.0", | ||
"all-contributors-cli": "^6.26.0", | ||
"doctoc": "^2.2.1", | ||
"eslint": "^8.43.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-config-standard": "^17.1.0", | ||
@@ -83,26 +90,24 @@ "eslint-plugin-import": "^2.27.5", | ||
"prettier": "^3.0.0", | ||
"prettier-plugin-svelte": "^3.1.2", | ||
"svelte": "^4.0.1", | ||
"svelte-jester": "^3.0.0", | ||
"typescript": "^5.3.3", | ||
"vite": "^4.3.9", | ||
"vitest": "^0.33.0" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged", | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
}, | ||
"lint-staged": { | ||
"README.md": [ | ||
"{README.md,.all-contributorsrc}": [ | ||
"npm run toc", | ||
"prettier --parser markdown --write", | ||
"git add" | ||
], | ||
".all-contributorsrc": [ | ||
"npm run contributors:generate", | ||
"git add" | ||
"npx --no-install prettier --write README.md .all-contributorsrc", | ||
"git add README.md .all-contributorsrc" | ||
], | ||
"**/*.js": [ | ||
"npm run lint", | ||
"npm test", | ||
"git add" | ||
"src/**/*": [ | ||
"npx --no-install vitest related --run" | ||
], | ||
"*.{js,cjs,ts,svelte,json,yml,yaml}": [ | ||
"npx --no-install prettier --check" | ||
], | ||
"*.{js,cjs,ts,svelte}": [ | ||
"npx --no-install eslint" | ||
] | ||
@@ -109,0 +114,0 @@ }, |
@@ -112,6 +112,5 @@ import { | ||
const act = (fn) => { | ||
const value = fn && fn() | ||
if (value !== undefined && typeof value.then === 'function') { | ||
return value.then(() => tick()) | ||
const act = async (fn) => { | ||
if (fn) { | ||
await fn() | ||
} | ||
@@ -118,0 +117,0 @@ return tick() |
@@ -5,6 +5,5 @@ // Type definitions for Svelte Testing Library | ||
import {queries, Queries, BoundFunction, EventType} from '@testing-library/dom' | ||
import {BoundFunction, EventType,Queries, queries} from '@testing-library/dom' | ||
import { ComponentConstructorOptions,ComponentProps, SvelteComponent } from 'svelte' | ||
import { SvelteComponent, ComponentProps, ComponentConstructorOptions } from 'svelte' | ||
export * from '@testing-library/dom' | ||
@@ -11,0 +10,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35958
24
491
29