test-drive-react
Advanced tools
Comparing version 1.3.0 to 1.4.0
{ | ||
"name": "test-drive-react", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Opinionated library for Test-Driven Development of React Components.", | ||
@@ -15,5 +15,5 @@ "main": "./cjs/index.js", | ||
"typecheck": "tsc --noEmit", | ||
"lint": "eslint .", | ||
"lint": "eslint", | ||
"pretest": "npm run typecheck && npm run lint", | ||
"test": "mocha-play \"./test/**/*.ts?(x)\"" | ||
"test": "mocha-web \"./test/**/*.ts?(x)\"" | ||
}, | ||
@@ -25,27 +25,27 @@ "peerDependencies": { | ||
"dependencies": { | ||
"test-drive": "^1.3.0" | ||
"test-drive": "^1.6.0" | ||
}, | ||
"devDependencies": { | ||
"@ts-tools/webpack-loader": "^4.0.0", | ||
"@types/chai": "^4.3.4", | ||
"@types/chai-dom": "^1.11.0", | ||
"@types/mocha": "^10.0.1", | ||
"@types/react": "^18.0.25", | ||
"@types/react-dom": "^18.0.9", | ||
"@types/sinon": "^10.0.13", | ||
"@types/sinon-chai": "^3.2.9", | ||
"@typescript-eslint/eslint-plugin": "^5.45.0", | ||
"@typescript-eslint/parser": "^5.45.0", | ||
"eslint": "^8.28.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-react": "^7.31.11", | ||
"mocha": "^10.1.0", | ||
"mocha-play": "^4.0.0", | ||
"playwright-chromium": "^1.28.1", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"rimraf": "^3.0.2", | ||
"typescript": "~4.9.3", | ||
"util": "^0.12.5", | ||
"webpack": "^5.75.0" | ||
"@eslint/js": "^9.10.0", | ||
"@playwright/browser-chromium": "^1.47.0", | ||
"@types/chai": "^4.3.19", | ||
"@types/chai-dom": "^1.11.3", | ||
"@types/mocha": "^10.0.8", | ||
"@types/react": "^18.3.5", | ||
"@types/react-dom": "^18.3.0", | ||
"@types/sinon": "^17.0.3", | ||
"@types/sinon-chai": "^3.2.12", | ||
"esbuild": "^0.23.1", | ||
"eslint": "^9.10.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-no-only-tests": "^3.3.0", | ||
"eslint-plugin-react": "^7.36.1", | ||
"mocha": "^10.7.3", | ||
"mocha-web": "^2.0.0", | ||
"prettier": "^3.3.3", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"rimraf": "^6.0.1", | ||
"typescript": "~5.6.2", | ||
"typescript-eslint": "^8.5.0" | ||
}, | ||
@@ -52,0 +52,0 @@ "files": [ |
@@ -11,3 +11,3 @@ import React from 'react'; | ||
withDriver<D extends DriverBase, E extends Element | Text | null>( | ||
DriverClass: IDriverConstructor<D, P, E> | ||
DriverClass: IDriverConstructor<D, P, E>, | ||
): IRenderingContextWithDriver<D>; | ||
@@ -45,3 +45,3 @@ } | ||
withDriver<D extends DriverBase, E extends Element | Text | null>( | ||
DriverClass: IDriverConstructor<D, P, E> | ||
DriverClass: IDriverConstructor<D, P, E>, | ||
): IRenderingContextWithDriver<D> { | ||
@@ -51,6 +51,6 @@ if (DriverClass.ComponentClass !== element.type) { | ||
} | ||
const driver = new DriverClass(() => container!.firstElementChild as E); | ||
const driver = new DriverClass(() => container.firstElementChild as E); | ||
return { | ||
driver, | ||
container: container!, | ||
container: container, | ||
}; | ||
@@ -57,0 +57,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
29265
Updatedtest-drive@^1.6.0