Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
form.submit(`http://localhost:${port}${apiPath}`, (err, res) => {
if (err) {
assert.fail(err);
}
assertStream.expect({
path: /public/
});
res.pipe(assertStream);
assertStream.on("finish", () => {
server.close();
});
});
});
it("can handle rep", () => {
const rep = new Rep(AnyAnnotation);
const src = `@ChangeControlled @Donkey("24", name = "Eeyore") public void magic() {}`;
const match = rep.matchPrefix(inputStateFromString(src), {}, {});
if (isSuccessfulMatch(match)) {
const mmmm = match.match as any;
assert(mmmm.$matched.trim() === `@ChangeControlled @Donkey("24", name = "Eeyore")`);
} else {
assert.fail("Didn't match");
}
});
.then(res => {
assert.fail(res, '', 'unexpected result')
}, err => {
assert(err instanceof Error)
fetch: function () {
assert.fail('should not have called fetch');
},
resourceLocation: 'http://example.com/'
.use('/linked/:to', ({ params, resolve }) => {
++called
assert.fail('should not route due to default prevented')
resolve()
})
}, error => {
assert.fail(error);
}, () => {
assert(actual.length == expected.length);
.use('/hash', () => {
assert.fail('must not match from hash when pathname routing')
})
.use(({ path }) => {
.use('/linked/:to', ({ params, resolve }) => {
++called
assert.fail('should not route due to target attribute')
})
.then(function () {
assert.fail('expected rejected promise');
}, function (err) {
assert(err);
beginTransaction: () => {
assert.fail();
}
};