Skip to content

Commit

Permalink
add gh action tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ajuvercr committed Apr 8, 2024
1 parent 9185b9d commit 4a737b2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: bun-test
on:
pull_request:
push:
branches:
- 'master'
jobs:
my-job:
name: bun-test
runs-on: ubuntu-latest
steps:
# ...
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1

# run any `bun` or `bunx` command
- run: bun install
- run: bun test

11 changes: 0 additions & 11 deletions test/configuration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,11 @@ describe("Input test", () => {
(x) => x.predicate.equals(RDF.terms.type) && x.object.equals(proc.ty),
)
.map((x) => x.subject);
console.log(
"checking proc",
proc.ty.value,
subjects.map((x) => x.value),
);
const processorLens = config.lenses[proc.ty.value];

found.push(
...subjects.map((id) => processorLens.execute({ id, quads: quads })),
);
}

console.log(
config.shapes.map((x) => x.ty.value),
processors,
);
console.log(found);
});
});
1 change: 0 additions & 1 deletion test/connectors/file.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ describe("File Channel", () => {

await sleep(300);
expect(items.length).toBe(1);
console.log(items);
expect(items[0].startsWith("Number 1")).toBeTruthy();

await writer.push("Number 2");
Expand Down
1 change: 0 additions & 1 deletion test/connectors/http.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ describe("connector-http", () => {
});

reader.data((data) => {
console.log("This reader works");
expect(Buffer.isBuffer(data)).toBeTruthy();
items.push(data.toString());
});
Expand Down
7 changes: 0 additions & 7 deletions test/processors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ describe("test existing processors", () => {
js:rescReader <jr>.
`;
const baseIRI = process.cwd() + "/config.ttl";
console.log(baseIRI);

const source: Source = {
value,
Expand Down Expand Up @@ -67,7 +66,6 @@ describe("test existing processors", () => {
js:sendWriter <jw>.
`;
const baseIRI = process.cwd() + "/config.ttl";
console.log(baseIRI);

const source: Source = {
value,
Expand Down Expand Up @@ -114,7 +112,6 @@ describe("test existing processors", () => {
js:sendWriter <jw>.
`;
const baseIRI = process.cwd() + "/config.ttl";
console.log(baseIRI);

const source: Source = {
value,
Expand Down Expand Up @@ -178,7 +175,6 @@ describe("test existing processors", () => {
js:output <jw>.
`;
const baseIRI = process.cwd() + "/config.ttl";
console.log(baseIRI);

const source: Source = {
value,
Expand All @@ -197,11 +193,8 @@ describe("test existing processors", () => {
const argss = extractSteps(proc!, quads, config);
expect(argss.length).toBe(1);
expect(argss[0].length).toBe(2);
console.log(argss);

const [[reader, writer]] = argss;
console.log(reader.ty.value);
console.log(writer.ty.value);

expect(reader).toBeInstanceOf(Object);
expect(reader.config.channel).toBeDefined();
Expand Down

0 comments on commit 4a737b2

Please sign in to comment.