Skip to content

Commit

Permalink
fix: unit test check version
Browse files Browse the repository at this point in the history
  • Loading branch information
badele committed Nov 27, 2023
1 parent 8e69d9c commit 951a4e1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 192 deletions.
2 changes: 1 addition & 1 deletion samples/generated_by_sh.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
dataset:
metadatas:
generated_with: 'cfwf@0.0.1 - https://github.com/badele/cfwf'
generated_with: 'cfwf@0.4.0 - https://github.com/badele/cfwf'
orders:
- players
- australian_open
Expand Down
2 changes: 1 addition & 1 deletion samples/generated_by_ts.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
dataset:
metadatas:
generated_with: 'cfwf@0.0.1 - https://github.com/badele/cfwf'
generated_with: 'cfwf@0.4.0 - https://github.com/badele/cfwf'
orders:
- players
- australian_open
Expand Down
124 changes: 0 additions & 124 deletions samples/sample.cfwf

This file was deleted.

62 changes: 0 additions & 62 deletions samples/sample.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions src/cfwf_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,14 @@ test("Title & comment", async () => {
assertEquals(`${footer}`, dsinfos.dataset.metadatas.generated_with);
});

test("Columns and headers columns size from sample.cfwf", async () => {
test("Columns and headers columns size from generated_by_sh.cfwf", async () => {
const options: CFWFOptions = {
chartabletop: "━",
chartablemiddle: "─",
chartablebottom: "━",
};

const content = await readTextCFWFFile("samples/sample.cfwf");
const content = await readTextCFWFFile("samples/generated_by_sh.cfwf");
const lines = content.split("\n");

const titlemarkerpos = searchMarker(lines, chartitlesep || "");
Expand Down Expand Up @@ -487,7 +487,7 @@ test("Number & array", async () => {
// });

test("Feature (no key element can be found in the doc with marker", async () => {
const content = await readTextCFWFFile("samples/sample.cfwf");
const content = await readTextCFWFFile("samples/generated_by_sh.cfwf");
const lines = content.split("\n");

let idx = 0;
Expand All @@ -510,7 +510,7 @@ test("Feature (no key element can be found in the doc with marker", async () =>

test("Reader & regenerate", async () => {
const samples = new CFWF({});
const content = await readTextCFWFFile("samples/sample.cfwf");
const content = await readTextCFWFFile("samples/generated_by_sh.cfwf");

samples.importCFWF(content);
await samples.saveCFWF("samples/samples_regenerated.cfwf", false);
Expand Down

0 comments on commit 951a4e1

Please sign in to comment.