Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Achieve better test coverage for Triples and Transform functions #73

merged 4 commits into from Jan 16, 2020
Changes from 1 commit
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

Document reasoning behind seldom-reached line and

add a test for it.
  • Loading branch information
Eyas committed Jan 16, 2020
commit df8c97e199bc235cba76a008ab15b5cde8a24a97
@@ -137,6 +137,12 @@ export function* process(triples: string[][]): Iterable<Triple> {
// certain layer overlays.

// 3.4 all-layers used to contain a test comment:
// (Subject: <>
// Predicate: <>
// Object: "A test comment.")
// We skip it manually.
if (match[0] === '') {
@@ -18,7 +18,6 @@ import {expect, use} from 'chai';
import chaiAsPromised from 'chai-as-promised';
import {ClientRequest, IncomingMessage} from 'http';
import https from 'https';
import {Observable} from 'rxjs';
import {toArray} from 'rxjs/operators';
import {SinonStub, stub} from 'sinon';
import {PassThrough, Writable} from 'stream';
@@ -140,6 +139,30 @@ describe('load', () => {

it('Multiple (skip test comment)', async () => {
const control = fakeResponse(200, 'Ok');
`<> <> "math" .\n`);
`<> <> "A test comment." .\n`);
`<> <> "science" .\n`);

await expect(triples).to.eventually.deep.equal([
Subject: UrlNode.Parse(''),
Predicate: UrlNode.Parse(''),
Object: SchemaString.Parse('"math"')!,
Subject: UrlNode.Parse(''),
Predicate: UrlNode.Parse(''),
Object: SchemaString.Parse('"science"')!,

it('Multiple (dirty broken)', async () => {
const control = fakeResponse(200, 'Ok');`<> <https://sc`);
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.