Lines Matching refs:assert
41 function(assert) { argument
42 const checkRecursively = makeRecursiveCheck(assert);
49 assert.error(err, fnName + ": no callback error");
59 assert.deepEqual(a.buffer, e64.buffer, m);
61 assert.equal(a, e, m);
65 testCases.deep.forEach(makeAsserter(assert.deepEqual));
67 makeAsserter(makeUnorderedDeepEqual(assert))
76 assert.error(err, "testBinary: no callback error");
77 assert.equal(response.length, 256, "testBinary");
78 assert.deepEqual(response, buf, "testBinary(Buffer)");
82 assert.error(err, "testBinary: no callback error");
83 assert.equal(response.length, 256, "testBinary");
84 assert.deepEqual(response, buf, "testBinary(string)");
92 assert.error(err, "testMapMap: no callback error");
93 assert.deepEqual(expected, response, "testMapMap");
97 assert.error(err, "testStruct: no callback error");
102 assert.error(err, "testNest: no callback error");
107 assert.error(err, "testInsanity: no callback error");
112 assert.error(err, "testInsanity2: no callback error");
117 assert.ok(
121 assert.ok(!response, "testException: no response");
125 assert.ok(
129 assert.ok(!response, "testException: no response");
130 assert.equal(err.errorCode, 1001, "testException: correct error code");
131 assert.equal(
139 assert.error(err, "testException: no callback error");
140 assert.ok(!response, "testException: no response");
144 assert.error(err, "testOneway: no callback error");
145 assert.strictEqual(response, undefined, "testOneway: void response");
150 assert.error(err, "checkOffByOne: no callback error");
151 assert.equal(-1, response);
152 assert.end();
166 test("Promise Client Tests", function(assert) { argument
167 const checkRecursively = makeRecursiveCheck(assert);
177 .catch(() => assert.fail("fnName"));
185 assert.deepEqual(a.buffer, e64.buffer, m);
187 assert.equal(a, e, m);
191 testCases.deep.forEach(makeAsserter(assert.deepEqual));
193 makeAsserter(makeUnorderedDeepEqual(assert))
201 .catch(() => assert.fail("testStruct"));
208 .catch(() => assert.fail("testNest"));
215 .catch(() => assert.fail("testInsanity"));
222 .catch(() => assert.fail("testInsanity2"));
227 assert.fail("testException: TException");
230 assert.ok(err instanceof TException);
236 assert.fail("testException: Xception");
239 assert.ok(err instanceof ttypes.Xception);
240 assert.equal(err.errorCode, 1001);
241 assert.equal("Xception", err.message);
247 assert.equal(undefined, response); //void
249 .catch(() => assert.fail("testException"));
254 assert.strictEqual(response, undefined, "testOneway: void response");
256 .catch(() => assert.fail("testOneway: should not reject"));
262 assert.equal(-1, response);
263 assert.end();
266 .catch(() => assert.fail("checkOffByOne"));
274 function makeRecursiveCheck(assert) { argument
278 assert.ok(equal, msg);
346 function makeUnorderedDeepEqual(assert) { argument
348 assert.equal(actual.length, expected.length, name);
357 assert.fail("Unexpected value " + actual[k] + " with key " + k);