Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("should detect param name format", () => {
assert.isTrue(argumentsParser._hasCLAParamNameFormat("--run"));
assert.isFalse(argumentsParser._hasCLAParamNameFormat("run"));
});
it("第一个参数为null,返回false", function ()
{
assert.isFalse(TopJs.String.startsWith(null, ''));
});
it("第二个参数为null,返回false", function ()
}).finally(function () {
console.log('finally ');
assert.isFalse(failed);
assert.isNull(err);
done();
});
});
it('returns false if url does not have either of those two substrings', () => {
const test = 'https://example.com/f00/bar';
assert.isFalse(isGistURL(test));
});
});
it('shouldRun is false when the analysis_type is funnel', function () {
assert.isFalse(ExplorerValidations.event_collection.shouldRun({ query: { analysis_type: 'funnel' } }));
});
it('shouldRun is true when the analysis_type is not', function () {
it("删除只有一个属性的对象", function ()
{
let obj = {
prop1: "prop1"
};
TopJs.Object.clear(obj);
assert.isFalse(obj.hasOwnProperty('prop1'));
});
it("同时删除多个属性", function ()
it('returns false if the query returns a list and the source returns an item', () => {
const s = new SourceDefinition({
id: 1,
returns: User.item(),
meta: {}
});
const q = new Query(
User,
['id'],
RETURNS_LIST
);
assert.isFalse(utils.doesSourceSatisfyQueryReturnType(s, q));
});
});
l.lock('resource1', 100, function (err, lock) {
assert.isFalse(!!err)
c++
assert.equal(c, 3)
lock.unlock()
done()
})
})
defaultSamplingProbability: 1,
perOperationStrategies: [
{
operation: 'op1',
probabilisticSampling: { samplingRate: 0 },
},
{
operation: 'op2',
probabilisticSampling: { samplingRate: 1 },
},
],
};
let sampler = new PerOperationSampler(strategies, 2);
let tracer = new Tracer('test', new NoopReporter(), sampler);
let span = tracer.startSpan('op1');
assert.isFalse(span._spanContext.isSampled());
assert.isFalse(span._spanContext.samplingFinalized);
span.setOperationName('op2');
assert.isTrue(span._spanContext.isSampled());
assert.isTrue(span._spanContext.samplingFinalized);
});
runInFrame(1, () => {
assert.isFalse(reducer.called);
done();
});
});