以下代码片段非常简单(从https://mochajs.org/#synchronous-code)。它感觉很愚蠢,但为什么[1,2,3]的计算结果与undefined一起使用,而不是用于myArray变量? Array
#indexOf()
1) Should return -1 when the value is not present
1) Array #indexO
好了,所以这是我的问题: it('should fail when Sns is not found within record', (done) => {
const policy = require('../main/nacl-002-handler.js');
const eventData = require('./data/event.json');
delete eventDat
我正在使用testdouble.js来测试几个函数。对于下面的函数,我正在努力弄清楚如何最好地存储get API调用,以覆盖剩余的函数。看起来应该是直截了当的,但我认为我一直盯着它太久了。 var checkTags = function(tags) {
return new Promise(function(resolve) {
/* istanbul ignore if