it ('add cell', () => {
     var list = new List();
     list.add(10);
     assert(list.get(0) === 10);
 });
Example #2
0
 glob('./.tmp/generated/**/*.md', (err, fileNames) => {
   assert(fileNames.length === 0);
   done();
 });
 return Future(() => 1).flatMap(x => Future(() => x + 1)).promise.then(x => assert(x === 2));
		it("generate string with parameter", () => {
			let str = hello("JavaScript");
			assert(str === "Hello, JavaScript");
		});
Example #5
0
 it('should be return new instance', () => {
   assert(post instanceof Post)
 })
Example #6
0
 c.once('shiba:return-lint-rule-url', (_: any, url: string) => {
     assert(url.indexOf('http') === 0);
     done();
 });
Example #7
0
 (_: any, msgs: LinterMessage[]) => {
     assert(msgs.length === 0);
     done();
 }
Example #8
0
 it(`extracts "endpoint" from ${name}`, () => {
     assert(GitHubApi.extractEndpoint(url) === "https://api.github.com");
 });
Example #9
0
 it(`extracts "endpoint" from ${name}`, () => {
     assert(GitHubApi.extractEndpoint(url) === "https://ghe.example.com/api/v3");
 });
Example #10
0
 }, done, (x) => {
   assert(x === 3)
   done()
 })
Example #11
0
 return run([]).then((results) => {
   assert(results.length === 0);
 });
Example #12
0
 sample(sampler)(stream).subscribe((x: number) => {
   assert(x === expected.shift())
 }, done, (x) => {
Example #13
0
 it('gives remove operation by inverse method', () => {
   const inverse = op.inverse()
   assert(inverse.type === 'remove')
   assert(inverse.index === 2)
   assert(inverse.length === 10)
 })
Example #14
0
 it('applies the operation to given string', () => {
   const actual = op.apply('test')
   const expected = 'te*inserted*st'
   assert(actual === expected)
 })
Example #15
0
 test(category + 'name', () => {
   const name = 'name1';
   const o = test(name, () => void 0);
   assert(o.meta.get('name') === 'name1'); // o.meta is private
 }),
Example #16
0
 it(`extracts "owner" from ${name}`, () => {
     assert(GitHubApi.extractOwner(url) === "foo");
 });
Example #17
0
 (shiori) => assert(shiori instanceof DummyShiori2),
Example #18
0
 it(`extracts "repository" from ${name}`, () => {
     assert(GitHubApi.extractRepository(url) === "something.useful");
 });
Example #19
0
 it('accepts default linter name', () => {
     assert(new Linter(dummy_contents, 'markdownlint', {}));
 });
Example #20
0
 it(`can parse itself`, () => {
     const npmConfig = new NpmConfig(require("../package.json"));
     assert(GitHubApi.extractRepository(npmConfig.repository.url) === "ci-npm-update");
 });
Example #21
0
 const sub = stream.subscribe((x) => {
   assert(x === expected.shift())
 }, done, () => {
Example #22
0
 it('kebabToCamel', () => {
   assert(kebabToCamel('transition-group') === 'transitionGroup')
   assert(kebabToCamel('article') === 'article')
   assert(kebabToCamel('test123-test-123') === 'test123Test123')
 })
		it("generate string with default value", () => {
			let str = hello();
			assert(str === "Hello, TypeScript");
		});
Example #24
0
		it("basic type check",()=>{
			for(let i in s){
				let o = s[i];
				assert(dg.checkType(o.str) === o.type,`type ${dtsmake.TSObjType[o.type]} check faild.`);
			}
		});
Example #25
0
 it('should be return initial value', () => {
   assert(post.letters === letters)
 })
Example #26
0
 return o.fn().then(() => assert.fail(), (e) => { // o.fn is private
   assert(e === error);
 });
Example #27
0
 it('should be return World', () => {
   assert(Hello() === 'World')
 })
Example #28
0
 return o.fn().then(() => { // o.fn is private
   assert(fn.callCount === 1);
   assert(fn.getCall(0).args.length === 0);
 });
 return Future(() => 1).flatMap(x => Future.failed(new Error)).promise.catch(e => assert(e instanceof Error));
Example #30
0
 stream.subscribe(done, (_err: Error) => {
   assert(_err === err)
   assert(_err.message === 'error message')
   done()
 })