Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* eslint-env node */
import {expect} from 'chai'
import {floor} from 'ember-frost-list/helpers/is-lead-selection'
import {describe, it} from 'mocha'
describe.skip('Unit / Helper / is-lead-selection', function () {
// Replace this with your real tests.
it('should work', function () {
let result = floor([42.8])
expect(result).to.equal(42)
})
})
describe('script', () => {
// TODO
describe('isCanonicalPubKey', () => {
it('rejects if not provided a Buffer', () => {
assert.strictEqual(false, bscript.isCanonicalPubKey(0 as any));
});
it('rejects smaller than 33', () => {
for (let i = 0; i < 33; i++) {
assert.strictEqual(
false,
bscript.isCanonicalPubKey(Buffer.allocUnsafe(i)),
);
}
});
});
describe.skip('isCanonicalScriptSignature', () => {
assert.ok(true);
});
describe('fromASM/toASM', () => {
fixtures.valid.forEach(f => {
it('encodes/decodes ' + f.asm, () => {
const script = bscript.fromASM(f.asm);
assert.strictEqual(bscript.toASM(script), f.asm);
});
});
fixtures.invalid.fromASM.forEach(f => {
it('throws ' + f.description, () => {
assert.throws(() => {
bscript.fromASM(f.script);
}, new RegExp(f.description));
options.skipParse = true
expect(posthtml()
.process(tree, options)
.then((result) => {
expect(input).to.eql(result.html)
done()
})
.catch((err) => done(err))
)
})
})
// TODO(michael-ciniawsky) enable when parser got curried
describe.skip('Set option', function () {
const html = ''
const document = `${html}`
options.directives = [
{ name: '?php', start: '<', end: '>' }
]
it.skip('directive ?php', function (done) {
expect(posthtml()
.process(html, options)
.then((result) => {
expect(html).to.eql(result.html)
done()
})
.catch((err) => done(err))
});
expect(result1).to.eql([
{ '#': 1 },
{ '#': 2 },
{ '#': 3 },
]);
expect(result2).to.eql([
{ '#': 3 },
{ '#': 4 },
{ '#': 5 },
]);
});
});
describe.skip('#search', () => {
beforeEach(() => buildStubs());
afterEach(() => restoreStubs());
it('should return no items', () => {
allStub.onFirstCall().returns([]);
const result = Sheets.search('foo', 'xxx');
expect(result).to.eql([]);
});
it('should return items', () => {
allStub.onFirstCall().returns([
{ '#': 1, title: 'Lorem ipsum' },
{ '#': 2, title: 'Dolat init' },
{ '#': 3, title: 'Foo ipsum' },
function ignoreIt(testElement) {
describe.skip(`${testElement.title}`, () => {});
}
import { Run } from '../src/compiler';
import { expect } from 'chai';
import { describe, it } from 'mocha';
describe.skip('Simple Run command test', () => {
it('Hello World!', async () => await new Run().run(['test.ts'], 'test.luabc'));
});
describe.skip('Simple Test command test', () => {
it('Hello World!', () => expect('Hello World!', new Run().test(['console.log(\'Hello World!\');'])));
});
import { Run } from '../src/compiler';
import { expect } from 'chai';
import { describe, it } from 'mocha';
describe.skip('Simple Run command test', () => {
it('Hello World!', async () => await new Run().run(['test.ts'], 'test.luabc'));
});
describe.skip('Simple Test command test', () => {
it('Hello World!', () => expect('Hello World!', new Run().test(['console.log(\'Hello World!\');'])));
});
before(test.setUpClass.bind(test))
after(test.tearDownClass.bind(test))
beforeEach(test.setUp.bind(test))
afterEach(test.tearDown.bind(test))
for (const fname of Object.keys(tests)) {
if (typeof tests[fname] === 'function') {
it(fname, tests[fname].bind(test))
}
else {
describe.skip(fname, skip(tests[fname]))
}
}
})
describe.skip(Class.name.replace(/Test$/, ''), () => {
for (const fname of Object.keys(skipped)) {
if (typeof skipped[fname] === 'function') {
it(fname, skipped[fname].bind(test))
}
else {
describe(fname, skip(skipped[fname]))
}
}
})
}
after(test.tearDownClass.bind(test))
beforeEach(test.setUp.bind(test))
afterEach(test.tearDown.bind(test))
for (let fname of Object.keys(tests)) {
if (typeof tests[fname] === 'function') {
let name = tests[fname].__desc || fname
it(name, tests[fname].bind(test))
}
else {
describe.skip(fname, skip(tests[fname]))
}
}
})
describe.skip(Class.name.replace(/^Test/, ''), () => {
for (let fname of Object.keys(skipped)) {
if (typeof skipped[fname] === 'function') {
it(fname, skipped[fname].bind(test))
}
else {
describe(fname, skip(skipped[fname]))
}
}
})
}
describe(Class.name.replace(/Test$/, ''), () => {
before(test.setUpClass.bind(test))
after(test.tearDownClass.bind(test))
beforeEach(test.setUp.bind(test))
afterEach(test.tearDown.bind(test))
for (const fname of Object.keys(tests)) {
if (typeof tests[fname] === 'function') {
it(fname, tests[fname].bind(test))
}
else {
describe.skip(fname, skip(tests[fname]))
}
}
})