Node.js Assertion Snippets
This extension contains code snippets for Node.js assertions for Visual Studio Code.
Installation
- Launch the Command Pallete (Ctrl + Shift + P or Cmd + Shift + P) and type
install extension
.
- Search for
assertion snippets
Snippets
assert.fail(${1:actual}, ${2:expected}, ${3:message}, ${4:operator});
assert(${1:actual}${2:, ${3:message}});
assert.ok(${1:actual}${2:, ${3:message}});
assert.equal(${1:actual}, ${2:expected}${3:, ${4:message}});
assert.notEqual(${1:actual}, ${2:expected}${3:, ${4:message}});
assert.deepEqual(${1:actual}, ${2:expected}${3:, ${4:message}});
assert.notDeepEqual(${1:actual}, ${2:expected}${3:, ${4:message}});
assert.strictEqual(${1:actual}, ${2:expected}${3:, ${4:message}});
assert.notStrictEqual(${1:actual}, ${2:expected}${3:, ${4:message}});
assert.deepStrictEqual(${1:actual}, ${2:expected}${3:, ${4:message}});
assert.notDeepStrictEqual(${1:actual}, ${2:expected}${3:, ${4:message}});
assert.throws(${1:block}${2:, ${3:error}}${4:, ${5:message}});
assert.doesNotThrow(${1:block}${2:, ${3:error}}${4:, ${5:message}});
assert.ifError(${1:value});