New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ava-fixture

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ava-fixture - npm Package Compare versions

Comparing version

to
0.3.3

30

dist/commonjs/fixture.d.ts

@@ -1,29 +0,3 @@

import test, { ContextualCallbackTest, ContextualTest } from 'ava';
import test from 'ava';
import { FixtureTest } from './interfaces';
export declare namespace Ava {
interface ContextualTestFunction {
(name: string, run: ContextualTest): void;
(run: ContextualTest): void;
}
interface TestFunction {
(name: string, implementation: Test): void;
(implementation: Test): void;
}
interface ContextualCallbackTestFunction {
(name: string, run: ContextualCallbackTest): void;
(run: ContextualCallbackTest): void;
}
interface Test extends ContextualTestFunction {
before: ContextualTestFunction;
after: ContextualTestFunction;
beforeEach: TestFunction;
afterEach: TestFunction;
skip: ContextualTestFunction;
only: ContextualTestFunction;
serial: ContextualTestFunction;
failing: ContextualCallbackTestFunction;
cb: ContextualCallbackTestFunction;
todo(name: string): void;
}
}
/**

@@ -35,2 +9,2 @@ * Creates fixture test.

*/
export default function fixture(ava: typeof test, path: string): FixtureTest;
export declare function fixture(ava: typeof test, path: string): FixtureTest;

5

dist/commonjs/fixture.js

@@ -23,3 +23,3 @@ "use strict";

process.chdir(fixturePath);
result = run(t, fixturePath, path_1.relative(cwd, fixturePath));
result = run(t, fixturePath);
if (result && result.then) {

@@ -56,4 +56,3 @@ return result.then(function (r) {

}
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = fixture;
exports.fixture = fixture;
//# sourceMappingURL=fixture.js.map

@@ -1,2 +0,3 @@

export * from './fixture';
import { fixture } from './fixture';
export default fixture;
export * from './interfaces';
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(require("./fixture"));
var fixture_1 = require("./fixture");
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = fixture_1.fixture;
//# sourceMappingURL=index.js.map
import { Test, ContextualTestContext, ContextualCallbackTestContext, Observable } from 'ava';
export declare type FixtureContextualTest = (t: ContextualTestContext, absolutePath: string, relativePath: string) => PromiseLike<any> | Iterator<any> | Observable | void;
export declare type FixtureContextualSerialTest = (t: ContextualTestContext, absolutePath: string, relativePath: string) => void;
export declare type FixtureContextualCallbackTest = (t: ContextualCallbackTestContext, absolutePath: string, relativePath: string) => void;
/**
* The fixture text context (the callback function).
*/
export declare type FixtureContextualTest = (t: ContextualTestContext, cwd: string) => PromiseLike<any> | Iterator<any> | Observable | void;
export declare type FixtureContextualSerialTest = (t: ContextualTestContext, cwd: string) => void;
export declare type FixtureContextualCallbackTest = (t: ContextualCallbackTestContext, cwd: string) => void;
export interface BeforeRunner {

@@ -20,2 +23,3 @@ (title: string, run: Test): void;

* @param run The test function.
* In this function, `cwd` is the fixture case folder.
*/

@@ -73,6 +77,6 @@ (title: string, caseName: string, run: FixtureContextualTest): void;

todo(title: string): void;
only(title: string, caseName: string, run: (t: ContextualTestContext, absolutePath: string, relativePath: string) => any): void;
only(caseName: string, run: (t: ContextualTestContext, absolutePath: string, relativePath: string) => any): void;
skip(title: string, caseName: string, run: (t: ContextualTestContext, absolutePath: string, relativePath: string) => any): void;
skip(caseName: string, run: (t: ContextualTestContext, absolutePath: string, relativePath: string) => any): void;
only(title: string, caseName: string, run: (t: ContextualTestContext, cwd: string) => any): void;
only(caseName: string, run: (t: ContextualTestContext, cwd: string) => any): void;
skip(title: string, caseName: string, run: (t: ContextualTestContext, cwd: string) => any): void;
skip(caseName: string, run: (t: ContextualTestContext, cwd: string) => any): void;
after(title: string, run: (t: ContextualTestContext) => void): void;

@@ -79,0 +83,0 @@ after(run: (t: ContextualTestContext) => void): void;

{
"name": "ava-fixture",
"description": "Write fixture tests with ava",
"version": "0.3.2",
"version": "0.3.3",
"main": "dist/commonjs/index.js",

@@ -6,0 +6,0 @@ "typings": "dist/commonjs/index.d.ts",

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