Skip to content
This repository has been archived by the owner on Sep 4, 2023. It is now read-only.

Commit

Permalink
feat: add types for createRunner
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Mar 15, 2021
1 parent 4f727b0 commit cd4589f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"experimentalObjectRestSpread": true
}
},
"ignorePatterns": ["node_modules/", "types/*.d.ts"],
"globals": {
"atom": false,
"pass": false,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Run your Atom package tests using Jasmine 3.x",
"repository": "https://github.com/UziTech/atom-jasmine3-test-runner",
"main": "index.js",
"types": "./types/index.d.ts",
"atomTestRunner": "./spec/runner",
"atomTranspilers": [
{
Expand Down
15 changes: 15 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { TestRunner } from "atom"
//@ts-ignore
import type { Reporter } from "jasmine"


/**
* Returns a Jasmine3 test runner. The returned value can be exported from your `atomTestRunner` script for Atom to
* consume. Both parameters are optional.
*
* @param options An object specifying customized options
* @param optionalConfigurationFunction If provided, atom-jasmine3-test-runner will call this function before jasmine is
* started so you can do whatever you'd like with the global variables. (i.e. add custom matchers, require plugins, etc.)
* @returns Returns a test runner created with the given `options` and `callback`.
*/
export function createRunner(options?: RunnerOptions, optionalConfigurationFunction?: Function): TestRunner

0 comments on commit cd4589f

Please sign in to comment.