fancy-test
fancy-test copied to clipboard
extends mocha with helpful, chainable extensions
There are a couple of issues that happen when you attempt to run mocha tests in parallel. The first is that a non-determinate number of tests are skipped. This problem...
I'm interested in using `oclif` in a `jest` project; ideally I'd like to use `jest` code as much as possible (i.e `it` & `describe`), but for now I'm looking into...
Runner expects `it` to be available in the global scope `global.it`. This fails under Vitest, which expects `it` to be imported explicitly, just like any other function. ```ts import {...
Hi there, Is it possible to use the context inside a stub ? It could be useful for use cases like this ```typescript import * as tmp from 'tmp-promise' import...
Version 2.2.8. Stub should allow functions that receive arguments so that passed arguments can be tested. This is functionally correct but throws a Typescript error. ``` .stub(anObject, 'functionName', (argv: string[])...
I'm really having difficulty figuring out how to perform tests using the stub when using TypeScript, and I cannot find much information about it. Here is a simple test I...
It would be quite useful to have access to the context object when setting up nock responses: ```ts fancy .add('resource', () => ({ ok: true })) .nock('https://example.com', (api, ctx) =>...
# Expected behavior Using stub to temporarily set an object property to a non-function value should be possible, such as in this TypeScript code: ```ts fancy .stub(process.stdout, "isTTY", false) .it("Sets...
https://github.com/oclif/fancy-test/blob/7a82fdd232d4ca5cc4c34f83551dc2fb2de457b2/src/nock.ts#L5 This library wraps nock in a very helpful way. However, in the above line of code, the type for the nock `host` is too restrictive. This should be changed...
I have branching logic based on whether or not stdout is TTY or not. I've been looking around for any information about how to do this. I'm probably going to...