本文整理匯總了TypeScript中assert.fail函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript fail函數的具體用法?TypeScript fail怎麽用?TypeScript fail使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了fail函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: done
acquisition.queryUpdateWithCurrentPackage(invalidPackage, (error: Error, returnPackage: acquisitionSdk.RemotePackage | acquisitionSdk.NativeUpdateNotification) => {
assert.fail("Should throw an error if the native implementation gave an incorrect package");
done();
});
示例2:
w.on("delete", path => { assert.fail(path) })
示例4:
.then(c => assert.equal(c, 0), () => assert.fail());
示例5:
() => assert.fail('This promise should pass')
示例6:
}, error => {
assert.fail(error, null, 'Linter error, Output - ' + outputChannel.output);
});
示例7:
errorLogger: (err) => assert.fail(0, 1, 'Failed to register', err),
示例8:
() => { assert.fail(0, 1, 'Command should not resolve', ''); },