Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/qunit

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/qunit - npm Package Compare versions

Comparing version 2.5.2 to 2.5.3

230

qunit/index.d.ts

@@ -10,3 +10,3 @@ // Type definitions for QUnit v2.5.0

* Instruct QUnit to wait for an asynchronous operation.
*
*
* The callback returned from `assert.async()` will throw an Error if it is

@@ -18,3 +18,3 @@ * invoked more than once (or more often than the accepted call count, if

* `QUnit.start()`.
*
*
* @param {number} [acceptCallCount=1] Number of expected callbacks before the test is done.

@@ -27,3 +27,3 @@ */

* regular expressions, dates and functions.
*
*
* The `deepEqual()` assertion can be used just like `equal()` when comparing

@@ -33,14 +33,14 @@ * the value of objects, such that `{ key: value }` is equal to

* deepEqual.
*
*
* `notDeepEqual()` can be used to explicitly test deep, strict inequality.
*
*
* @param actual Object or Expression being tested
* @param expected Known comparision value
* @param {string} [message] A short description of the assertion
* @param {string} [message] A short description of the assertion
*/
deepEqual(actual: any, expected: any, message?: string): void;
deepEqual<T>(actual: T, expected: T, message?: string): void;
/**
* A non-strict comparison, roughly equivalent to JUnit's assertEquals.
*
*
* The `equal` assertion uses the simple comparison operator (`==`) to

@@ -51,7 +51,7 @@ * compare the actual and expected arguments. When they are equal, the

* message.
*
*
* `notEqual()` can be used to explicitly test inequality.
*
*
* `strictEqual()` can be used to test strict equality.
*
*
* @param actual Expression being tested

@@ -62,6 +62,6 @@ * @param expected Known comparison value

equal(actual: any, expected: any, message?: string): void;
/**
* Specify how many assertions are expected to run within a test.
*
*
* To ensure that an explicit number of assertions are run within any test,

@@ -71,11 +71,11 @@ * use `assert.expect( number )` to register an expected count. If the

* fail.
*
*
* @param {number} amount Number of assertions in this test.
*/
expect(amount: number): void;
/**
* An inverted deep recursive comparison, working on primitive types,
* arrays, objects, regular expressions, dates and functions.
*
*
* @param actual Object or Expression being tested

@@ -86,6 +86,6 @@ * @param expected Known comparison value

notDeepEqual(actual: any, expected: any, message?: string): void;
/**
* A non-strict comparison, checking for inequality.
*
*
* The `notEqual` assertion uses the simple inverted comparison operator

@@ -96,7 +96,7 @@ * (`!=`) to compare the actual and expected arguments. When they aren't

* to a given message.
*
*
* `equal()` can be used to test equality.
*
*
* `notStrictEqual()` can be used to test strict inequality.
*
*
* @param actual Object or Expression being tested

@@ -107,3 +107,3 @@ * @param expected Known comparison value

notEqual(actual: any, expected: any, message?: string): void;
/**

@@ -113,7 +113,7 @@ * A boolean check, inverse of `ok()` and CommonJS's `assert.ok()`, and

* falsy.
*
*
* `notOk()` requires just one argument. If the argument evaluates to false,
* the assertion passes; otherwise, it fails. If a second message argument
* is provided, it will be displayed in place of the result.
*
*
* @param state Expression being tested

@@ -123,18 +123,18 @@ * @param {string} [message] A short description of the assertion

notOk(state: any, message?: string): void;
/**
* A strict comparison of an object's own properties, checking for inequality.
*
*
* The `notPropEqual` assertion uses the strict inverted comparison operator
* (`!==`) to compare the actual and expected arguments as Objects regarding
* only their properties but not their constructors.
*
*
* When they aren't equal, the assertion passes; otherwise, it fails. When
* it fails, both actual and expected values are displayed in the test
* result, in addition to a given message.
*
*
* `equal()` can be used to test equality.
*
*
* `propEqual()` can be used to test strict equality of an Object properties.
*
*
* @param actual Object or Expression being tested

@@ -145,6 +145,6 @@ * @param expected Known comparison value

notPropEqual(actual: any, expected: any, message?: string): void;
/**
* A strict comparison, checking for inequality.
*
*
* The `notStrictEqual` assertion uses the strict inverted comparison

@@ -155,7 +155,7 @@ * operator (`!==`) to compare the actual and expected arguments. When they

* addition to a given message.
*
*
* `equal()` can be used to test equality.
*
*
* `strictEqual()` can be used to test strict equality.
*
*
* @param actual Object or Expression being tested

@@ -166,7 +166,7 @@ * @param expected Known comparison value

notStrictEqual(actual: any, expected: any, message?: string): void;
/**
* A boolean check, equivalent to CommonJS's assert.ok() and JUnit's
* assertTrue(). Passes if the first argument is truthy.
*
*
* The most basic assertion in QUnit, ok() requires just one argument. If

@@ -176,3 +176,3 @@ * the argument evaluates to true, the assertion passes; otherwise, it

* place of the result.
*
*
* @param state Expression being tested

@@ -182,15 +182,15 @@ * @param {string} message A short description of the assertion

ok(state: any, message?: string): void;
/**
* A strict type and value comparison of an object's own properties.
*
*
* The `propEqual()` assertion provides strictly (`===`) comparison of
* Object properties. Unlike `deepEqual()`, this assertion can be used to
* compare two objects made with different constructors and prototype.
*
*
* `strictEqual()` can be used to test strict equality.
*
*
* `notPropEqual()` can be used to explicitly test strict inequality of
* Object properties.
*
*
* @param actual Object or Expression being tested

@@ -201,6 +201,6 @@ * @param expected Known comparison value

propEqual(actual: any, expected: any, message?: string): void;
/**
* Report the result of a custom assertion
*
*
* Some test suites may need to express an expectation that is not defined

@@ -211,7 +211,7 @@ * by any of QUnit's built-in assertions. This need may be met by

* into QUnit's `ok` assertion.
*
*
* A more readable solution would involve defining a custom assertion. If
* the expectation function invokes `pushResult`, QUnit will be notified of
* the result and report it accordingly.
*
*
* @param assertionResult The assertion result

@@ -225,13 +225,13 @@ */

}): void;
/**
* A strict type and value comparison.
*
*
* The `strictEqual()` assertion provides the most rigid comparison of type
* and value with the strict equality operator (`===`).
*
*
* `equal()` can be used to test non-strict equality.
*
*
* `notStrictEqual()` can be used to explicitly test strict inequality.
*
*
* @param actual Object or Expression being tested

@@ -241,12 +241,12 @@ * @param expected Known comparison value

*/
strictEqual(actual: any, expected: any, message?: string): void;
strictEqual<T>(actual: T, expected: T, message?: string): void;
/**
* Test if a callback throws an exception, and optionally compare the thrown
* error.
*
*
* When testing code that is expected to throw an exception based on a
* specific set of circumstances, use assert.throws() to catch the error
* object for testing and comparison.
*
*
* In very few environments, like Closure Compiler, throws is considered a

@@ -262,10 +262,10 @@ * reserved word and will cause an error. For that case, an alias is bundled

* A marker for progress in a given test.
*
* The `step()` assertion registers a passing assertion with a provided message. This makes
* it easy to check that specific portions of code are being executed, especially in
* asynchronous test cases and when used with `verifySteps()`.
*
*
* The `step()` assertion registers a passing assertion with a provided message. This makes
* it easy to check that specific portions of code are being executed, especially in
* asynchronous test cases and when used with `verifySteps()`.
*
* Together with the `verifySteps()` method, `step()` assertions give you an easy way
* to verify both the count and order of code execution.
*
*
* @param message Message to display for the step

@@ -277,7 +277,7 @@ */

* A helper assertion to verify the order and number of steps in a test.
*
*
* The assert.verifySteps() assertion compares a given array of string values (representing steps)
* with the order and values of previous step() calls. This assertion is helpful for verifying
* the order and count of portions of code paths, especially asynchronous ones.
*
*
* @param steps Array of strings representing steps to verify

@@ -287,3 +287,3 @@ * @param message A short description of the assertion

verifySteps(steps: string[], message?: string): void;
}

@@ -323,3 +323,3 @@

* module's queue has emptied, it will not run this hook again.
*/
*/
after?: (assert: Assert) => void;

@@ -348,3 +348,3 @@

* module's queue has emptied, it will not run this hook again.
*/
*/
after: (fn: (assert: Assert) => void) => void;

@@ -366,3 +366,3 @@

beforeEach: (fn: (assert: Assert) => void) => void;
}

@@ -403,10 +403,10 @@

interface QUnit {
/**
* Namespace for QUnit assertions
*
*
* QUnit's built-in assertions are defined on the `QUnit.assert` object. An
* instance of this object is passed as the only argument to the `QUnit.test`
* function callback.
*
*
* This object has properties for each of QUnit's built-in assertion methods.

@@ -418,5 +418,5 @@ */

* Register a callback to fire whenever the test suite begins.
*
*
* `QUnit.begin()` is called once before running any tests.
*
*
* @callback callback Callback to execute.

@@ -428,3 +428,3 @@ */

* Configuration for QUnit
*
*
* QUnit has a bunch of internal configuration defaults, some of which are

@@ -437,3 +437,3 @@ * useful to override. Check the description for each option for details.

* Register a callback to fire whenever the test suite ends.
*
*
* @param callback Callback to execute

@@ -445,3 +445,3 @@ */

* Advanced and extensible data dumping for JavaScript.
*
*
* This method does string serialization by parsing data structures and

@@ -452,6 +452,6 @@ * objects. It parses DOM elements to a string representation of their outer

* `[object Array]` placeholders.
*
*
* If you need more or less output, change the value of `QUnit.dump.maxDepth`,
* representing how deep the elements should be parsed.
*
*
* Note: This method used to be in QUnit.jsDump, which was changed to

@@ -467,3 +467,3 @@ * QUnit.dump. The old property will be removed in QUnit 3.0.

* Copy the properties defined by the `mixin` object into the `target` object.
*
*
* This method will modify the `target` object to contain the "own" properties

@@ -473,3 +473,3 @@ * defined by the `mixin`. If the `mixin` object specifies the value of any

* `target` object.
*
*
* @param target An object whose properties are to be modified

@@ -482,8 +482,8 @@ * @param mixin An object describing which properties should be modified

* Register a callback to fire whenever an assertion completes.
*
*
* This is one of several callbacks QUnit provides. Its intended for
* integration scenarios like PhantomJS or Jenkins. The properties of the
* details argument are listed below as options.
*
* @param callback Callback to execute
*
* @param callback Callback to execute
*/

@@ -496,3 +496,3 @@ log(callback: (details: QUnit.LogDetails) => void): void;

* You can use the module name to organize, select, and filter tests to run.
*
*
* All tests inside a module callback function will be grouped into that

@@ -503,7 +503,7 @@ * module. The test names will all be preceded by the module name in the

* prefixed by their parent modules.
*
*
* If `QUnit.module` is defined without a `nested` callback argument, all
* subsequently defined tests will be grouped into the module until another
* module is defined.
*
*
* Modules with test group functions allow you to define nested modules, and

@@ -515,3 +515,3 @@ * QUnit will run tests on the parent module before going deep on the nested

* `afterEach` and `after` callbacks will form a stack.
*
*
* You can specify code to run before and after tests using the hooks

@@ -522,3 +522,3 @@ * argument, and also to create properties that will be shared on the

* `QUnit.module` with a callback argument.
*
*
* The module's callback is invoked with the test environment as its `this`

@@ -529,3 +529,3 @@ * context, with the environment's properties copied to the module's tests,

* value for each test.
*
*
* @param {string} name Label for this group of tests

@@ -540,3 +540,3 @@ * @param hookds Callbacks to run during test execution

* Register a callback to fire whenever a module ends.
*
*
* @param callback Callback to execute

@@ -548,3 +548,3 @@ */

* Register a callback to fire whenever a module begins.
*
*
* @param callback Callback to execute

@@ -556,13 +556,13 @@ */

* Adds a test to exclusively run, preventing all other tests from running.
*
*
* Use this method to focus your test suite on a specific test. QUnit.only
* will cause any other tests in your suite to be ignored.
*
*
* Note, that if more than one QUnit.only is present only the first instance
* will run.
*
*
* This is an alternative to filtering tests to run in the HTML reporter. It
* is especially useful when you use a console reporter or in a codebase
* with a large set of long running tests.
*
*
* @param {string} name Title of unit being tested

@@ -575,13 +575,13 @@ * @param callback Function to close over assertions

* DEPRECATED: Report the result of a custom assertion.
*
*
* This method is deprecated and it's recommended to use pushResult on its
* direct reference in the assertion context.
*
*
* QUnit.push reflects to the current running test, and it may leak
* assertions in asynchronous mode. Checkout assert.pushResult() to set a
* proper custom assertion.
*
*
* Invoking QUnit.push allows to create a readable expectation that is not
* defined by any of QUnit's built-in assertions.
*
*
* @deprecated

@@ -593,10 +593,10 @@ */

* Adds a test like object to be skipped.
*
*
* Use this method to replace QUnit.test() instead of commenting out entire
* tests.
*
*
* This test's prototype will be listed on the suite as a skipped test,
* ignoring the callback argument and the respective global and module's
* hooks.
*
*
* @param {string} Title of unit being tested

@@ -608,13 +608,13 @@ */

* Returns a single line string representing the stacktrace (call stack).
*
*
* This method returns a single line string representing the stacktrace from
* where it was called. According to its offset argument, `QUnit.stack()` will
* return the correspondent line from the call stack.
*
*
* The default `offset` is `0` and will return the current location where it
* was called.
*
*
* Not all browsers support retrieving stracktraces. In those, `QUnit.stack()`
* will return undefined.
*
*
* @param {number} offset Set the stacktrace line offset.

@@ -627,6 +627,6 @@ */

* `QUnit.config.autostart` set to `false`.
*
*
* This method was previously used to control async tests on text contexts
* along with QUnit.stop. For asynchronous tests, use assert.async instead.
*
*
* When your async test has multiple exit points, call `QUnit.start()` for the

@@ -639,5 +639,5 @@ * corresponding number of `QUnit.stop()` increments.

* Add a test to run.
*
*
* Add a test to run using `QUnit.test()`.
*
*
* The `assert` argument to the callback contains all of QUnit's assertion

@@ -649,3 +649,3 @@ * methods. Use this argument to call your test assertions.

* your callback function.
*
*
* @param {string} Title of unit being tested

@@ -658,3 +658,3 @@ * @param callback Function to close over assertions

* Register a callback to fire whenever a test ends.
*
*
* @param callback Callback to execute

@@ -673,3 +673,3 @@ */

* Register a callback to fire whenever a test begins.
*
*
* @param callback Callback to execute

@@ -704,3 +704,3 @@ */

* Are the test running from the server or not.
*/
*/
isLocal: boolean;

@@ -707,0 +707,0 @@

{
"name": "@types/qunit",
"version": "2.5.2",
"version": "2.5.3",
"description": "TypeScript definitions for QUnit",

@@ -25,4 +25,4 @@ "license": "MIT",

"dependencies": {},
"typesPublisherContentHash": "26c0ef6bc75684d5458e40c50375f982ac1ec5d2c068061e3e5d21e88072cd8e",
"typesPublisherContentHash": "9cacab50e8c9c04b3cbbf8dffc6fa375d5d4a0585de9ef1264403e2205e0a654",
"typeScriptVersion": "2.0"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Mon, 30 Jul 2018 23:12:12 GMT
* Last updated: Tue, 04 Sep 2018 23:00:34 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: QUnit

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc