about summary refs log tree commit diff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/build.js5
-rw-r--r--test/check.js10
-rw-r--r--test/package.json3
3 files changed, 12 insertions, 6 deletions
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": [],