Skip to content

Commit

Permalink
release 0.0.5
Browse files Browse the repository at this point in the history
Signed-off-by: Cory Rylan <cory@coryrylan.com>
  • Loading branch information
coryrylan committed Jun 20, 2023
1 parent 5104bc7 commit c609b26
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.0.5
- fix `defaultTimeoutInterval` default and docs

## 0.0.4
- update dependencies
- fix CSS inline format
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
...jasmineTestRunnerConfig(),
testFramework: {
config: {
timeout: 10000
defaultTimeoutInterval: 5000
},
},
nodeResolve: true,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-test-runner-jasmine",
"version": "0.0.4",
"version": "0.0.5",
"description": "Plugin for Jasmine and Web Test Runner",
"main": "./index.js",
"module": "./index.js",
Expand All @@ -18,14 +18,14 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/coryrylan/web-test-runner-jasmine.git"
"url": "git+https://github.com/blueprintui/web-test-runner-jasmine.git"
},
"author": "Crylan Software",
"license": "MIT",
"bugs": {
"url": "https://github.com/coryrylan/web-test-runner-jasmine/issues"
"url": "https://github.com/blueprintui/web-test-runner-jasmine/issues"
},
"homepage": "https://github.com/coryrylan/web-test-runner-jasmine#readme",
"homepage": "https://github.com/blueprintui/web-test-runner-jasmine",
"devDependencies": {
"@types/jasmine": "^4.3.1",
"@web/dev-server-esbuild": "^0.4.1",
Expand Down
14 changes: 11 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,24 @@ import { pathToFileURL } from 'url';
const require = createRequire(import.meta.url);
const jasminePath = pathToFileURL(require.resolve('jasmine-core/lib/jasmine-core/jasmine.js'));

export interface JasmineConfig {
/** https://jasmine.github.io/api/edge/jasmine.html#.DEFAULT_TIMEOUT_INTERVAL */
defaultTimeoutInterval?: number;
/** @deprecated use defaultTimeoutInterval */
timeout?: number;
styles?: []
}

export const jasmineTestRunnerConfig = () => {
return {
reporters: [
defaultReporter({ reportTestResults: true, reportTestProgress: true })
],
testRunnerHtml: (_path: any, config: { testFramework: { config?: { timeout?: number, styles?: [] }}}) => {
testRunnerHtml: (_path: any, config: { testFramework: { config?: JasmineConfig }}) => {
const testFramework = {
path: './node_modules/jasmine-core/lib/jasmine-core/jasmine.js',
config: {
timeout: 20000,
defaultTimeoutInterval: 5000,
styles: [],
...config.testFramework?.config
}
Expand Down Expand Up @@ -85,7 +93,7 @@ export const jasmineTestRunnerConfig = () => {
(async () => {
sessionStarted();
const { testFile, watch, debug, testFrameworkConfig } = await getConfig();
const config = { defaultTimeoutInterval: 60000, ...(testFrameworkConfig ?? {}) };
const config = { defaultTimeoutInterval: 5000, ...(testFrameworkConfig ?? {}) };
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.defaultTimeoutInterval;
Expand Down
2 changes: 1 addition & 1 deletion web-test-runner.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
...jasmineTestRunnerConfig(),
testFramework: {
config: {
timeout: 10000
defaultTimeoutInterval: 10000
},
},
nodeResolve: true,
Expand Down

0 comments on commit c609b26

Please sign in to comment.