diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | test/build.js | 5 | ||||
-rw-r--r-- | test/check.js | 10 | ||||
-rw-r--r-- | test/package.json | 3 |
4 files changed, 13 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore index 77038aa..f5c3e7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +api # testing node_modules diff --git a/test/build.js b/test/build.js new file mode 100644 index 0000000..c5b6e8c --- /dev/null +++ b/test/build.js @@ -0,0 +1,5 @@ +import Kronikarz from 'kronikarz'; + +const k = new Kronikarz('../wpisy'); + +k.generateApi('../api'); diff --git a/test/check.js b/test/check.js index 5bae1f5..12ed637 100644 --- a/test/check.js +++ b/test/check.js @@ -1,11 +1,11 @@ -import readline from "readline"; -import { parsePost } from "kronikarz/dist/parsePost"; +import readline from 'readline'; +import Post from 'kronikarz/dist/Post'; const rl = readline.createInterface({ input: process.stdin, - output: process.stdout + output: process.stdout, }); -rl.question("", filePath => { - parsePost(filePath); +rl.question('', (filePath) => { + new Post(filePath); }); diff --git a/test/package.json b/test/package.json index f78dd9d..52960ed 100644 --- a/test/package.json +++ b/test/package.json @@ -5,9 +5,10 @@ "main": "check.js", "dependencies": { "esm": "^3.2.25", - "kronikarz": "^1.0.0" + "kronikarz": "^2.0.0" }, "scripts": { + "build": "mkdir -p ../api/api && touch ../api/api/posts.json && node -r esm build.js", "test": "./validator.sh" }, "keywords": [], |