@tapjs/test
Advanced tools
Comparing version 0.0.0-13 to 0.0.0-14
{ | ||
"name": "@tapjs/test", | ||
"version": "0.0.0-13", | ||
"version": "0.0.0-14", | ||
"description": "the pluggable Test class for node-tap", | ||
@@ -44,3 +44,3 @@ "author": "Isaac Z. Schlueter <i@izs.me> (https://blog.izs.me)", | ||
"peerDependencies": { | ||
"@tapjs/core": "0.0.0-13" | ||
"@tapjs/core": "0.0.0-14" | ||
}, | ||
@@ -47,0 +47,0 @@ "dependencies": { |
@@ -23,2 +23,6 @@ //{{HEADER COMMENT START}} | ||
export const testFileExtensions = new Set(['js', 'cjs', 'mjs']) | ||
//{{FILE TYPES START}} | ||
//{{FILE TYPES END}} | ||
const kInspect = Symbol.for('nodejs.util.inspect.custom') | ||
@@ -45,3 +49,6 @@ const copyInspect = (v: Function) => ({ | ||
) { | ||
const thisArg = this === t ? plug : this | ||
// if you do `const { method } = t` then calling `method` will | ||
// call it on the plugin that provided it. | ||
// So no need to pre-bind anything, really. | ||
const thisArg = this === t || this === undefined ? plug : this | ||
const ret = v.apply(thisArg, args) | ||
@@ -73,5 +80,2 @@ // If a plugin method returns 'this', and it's the plugin, | ||
/** | ||
* Union type of the return values of an array of functions | ||
*/ | ||
type AnyReturnValue<A extends ((...a: any[]) => any)[]> = A extends [ | ||
@@ -78,0 +82,0 @@ infer H extends (...a: any[]) => any, |
@@ -17,2 +17,3 @@ import { PromiseWithSubtest, TapPlugin, TestBase, TestBaseOpts } from '@tapjs/core'; | ||
import type { ConfigSet, Jack } from 'jackspeak'; | ||
export declare const testFileExtensions: Set<string>; | ||
export type PluginResult<P extends ((t: TestBase, opts: any) => any)[]> = P extends [ | ||
@@ -19,0 +20,0 @@ infer H extends (t: TestBase, opts: any) => any, |
@@ -29,3 +29,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Test = exports.signature = exports.loaders = exports.config = void 0; | ||
exports.Test = exports.signature = exports.loaders = exports.config = exports.testFileExtensions = void 0; | ||
const core_1 = require("@tapjs/core"); | ||
@@ -49,2 +49,10 @@ //{{PLUGIN IMPORT START}} | ||
const node_util_1 = require("node:util"); | ||
exports.testFileExtensions = new Set(['js', 'cjs', 'mjs']); | ||
//{{FILE TYPES START}} | ||
exports.testFileExtensions.add("ts"); | ||
exports.testFileExtensions.add("cts"); | ||
exports.testFileExtensions.add("mts"); | ||
exports.testFileExtensions.add("tsx"); | ||
exports.testFileExtensions.add("jsx"); | ||
//{{FILE TYPES END}} | ||
const kInspect = Symbol.for('nodejs.util.inspect.custom'); | ||
@@ -61,3 +69,6 @@ const copyInspect = (v) => ({ | ||
const f = function (...args) { | ||
const thisArg = this === t ? plug : this; | ||
// if you do `const { method } = t` then calling `method` will | ||
// call it on the plugin that provided it. | ||
// So no need to pre-bind anything, really. | ||
const thisArg = this === t || this === undefined ? plug : this; | ||
const ret = v.apply(thisArg, args); | ||
@@ -64,0 +75,0 @@ // If a plugin method returns 'this', and it's the plugin, |
@@ -17,2 +17,3 @@ import { PromiseWithSubtest, TapPlugin, TestBase, TestBaseOpts } from '@tapjs/core'; | ||
import type { ConfigSet, Jack } from 'jackspeak'; | ||
export declare const testFileExtensions: Set<string>; | ||
export type PluginResult<P extends ((t: TestBase, opts: any) => any)[]> = P extends [ | ||
@@ -19,0 +20,0 @@ infer H extends (t: TestBase, opts: any) => any, |
@@ -22,2 +22,10 @@ //{{HEADER COMMENT START}} | ||
import { inspect } from 'node:util'; | ||
export const testFileExtensions = new Set(['js', 'cjs', 'mjs']); | ||
//{{FILE TYPES START}} | ||
testFileExtensions.add("ts"); | ||
testFileExtensions.add("cts"); | ||
testFileExtensions.add("mts"); | ||
testFileExtensions.add("tsx"); | ||
testFileExtensions.add("jsx"); | ||
//{{FILE TYPES END}} | ||
const kInspect = Symbol.for('nodejs.util.inspect.custom'); | ||
@@ -34,3 +42,6 @@ const copyInspect = (v) => ({ | ||
const f = function (...args) { | ||
const thisArg = this === t ? plug : this; | ||
// if you do `const { method } = t` then calling `method` will | ||
// call it on the plugin that provided it. | ||
// So no need to pre-bind anything, really. | ||
const thisArg = this === t || this === undefined ? plug : this; | ||
const ret = v.apply(thisArg, args); | ||
@@ -37,0 +48,0 @@ // If a plugin method returns 'this', and it's the plugin, |
@@ -35,2 +35,11 @@ //{{HEADER COMMENT START}} | ||
export const testFileExtensions = new Set(['js', 'cjs', 'mjs']) | ||
//{{FILE TYPES START}} | ||
testFileExtensions.add("ts") | ||
testFileExtensions.add("cts") | ||
testFileExtensions.add("mts") | ||
testFileExtensions.add("tsx") | ||
testFileExtensions.add("jsx") | ||
//{{FILE TYPES END}} | ||
const kInspect = Symbol.for('nodejs.util.inspect.custom') | ||
@@ -57,3 +66,6 @@ const copyInspect = (v: Function) => ({ | ||
) { | ||
const thisArg = this === t ? plug : this | ||
// if you do `const { method } = t` then calling `method` will | ||
// call it on the plugin that provided it. | ||
// So no need to pre-bind anything, really. | ||
const thisArg = this === t || this === undefined ? plug : this | ||
const ret = v.apply(thisArg, args) | ||
@@ -85,5 +97,2 @@ // If a plugin method returns 'this', and it's the plugin, | ||
/** | ||
* Union type of the return values of an array of functions | ||
*/ | ||
type AnyReturnValue<A extends ((...a: any[]) => any)[]> = A extends [ | ||
@@ -90,0 +99,0 @@ infer H extends (...a: any[]) => any, |
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
Sorry, the diff of this file is not supported yet
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
186173
2756