From da76d7a93ed59a6444cbbb1c25fa0f7ef73cf4db Mon Sep 17 00:00:00 2001 From: Jackson Morgan Date: Thu, 26 Dec 2024 21:12:22 -0500 Subject: [PATCH] Wrote test scripts --- packages/cli/.gitignore | 3 ++- packages/cli/package.json | 9 ++------- packages/cli/test/.shapes/foafProfile.shex | 19 ------------------- packages/cli/test/package.json | 4 ---- packages/cli/test/placeholder.test.ts | 3 --- 5 files changed, 4 insertions(+), 34 deletions(-) delete mode 100644 packages/cli/test/.shapes/foafProfile.shex delete mode 100644 packages/cli/test/package.json delete mode 100644 packages/cli/test/placeholder.test.ts diff --git a/packages/cli/.gitignore b/packages/cli/.gitignore index 7d05a05..433f129 100644 --- a/packages/cli/.gitignore +++ b/packages/cli/.gitignore @@ -1 +1,2 @@ -test/.ldo \ No newline at end of file +./example-create +./example-init \ No newline at end of file diff --git a/packages/cli/package.json b/packages/cli/package.json index 4f59999..a9547c0 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -7,21 +7,16 @@ "ldo": "./dist/index.js" }, "scripts": { - "start": "node dist/index.js build", - "start:init": "node dist/index.js init", - "dev": "npm run build && npm run start:init", "build": "npm run clean && npm run build:ts && npm run copy-files", "build:ts": "tsc --project tsconfig.build.json", "clean": "rimraf dist/", "copy-files": "copyfiles -u 1 \"./src/**/*.ejs\" dist/", "update-permission": "chmod +x ./dist/index.js", - "watch": "tsc --watch", "test": "jest --coverage", - "test:watch": "jest --watch", "prepublishOnly": "npm run test && npm run build", "lint": "eslint src/** --fix --no-error-on-unmatched-pattern", - "build:ldo": "./dist/index.js build --input test/.shapes --output test/.ldo", - "generate-readme": "./dist/index.js generate-readme --project ./test --shapes ./test/.shapes/ --ldo ./test/.ldo/" + "test:init": "rm -rf ./example-init && mkdir ./example-init && cd ./example-init && ../dist/index.js init", + "test:create": "rm -rf ./example-create && ./dist/index.js create ./example-create" }, "repository": { "type": "git", diff --git a/packages/cli/test/.shapes/foafProfile.shex b/packages/cli/test/.shapes/foafProfile.shex deleted file mode 100644 index dff09d1..0000000 --- a/packages/cli/test/.shapes/foafProfile.shex +++ /dev/null @@ -1,19 +0,0 @@ -# This shape is provided by default as an example -# You can create your own shape to fit your needs using ShEx (https://shex.io) -# Also check out https://shaperepo.com for examples of more shapes. - -PREFIX ex: -PREFIX foaf: -PREFIX rdfs: -PREFIX xsd: - -ex:FoafProfile EXTRA a { - a [ foaf:Person ] - // rdfs:comment "Defines the node as a Person (from foaf)" ; - foaf:name xsd:string ? - // rdfs:comment "Define a person's name." ; - foaf:img xsd:string ? - // rdfs:comment "Photo link but in string form" ; - foaf:knows @ex:FoafProfile * - // rdfs:comment "A list of WebIds for all the people this user knows." ; -} diff --git a/packages/cli/test/package.json b/packages/cli/test/package.json deleted file mode 100644 index 554a6ba..0000000 --- a/packages/cli/test/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "foaf-profile", - "description": "A profile using FOAF." -} \ No newline at end of file diff --git a/packages/cli/test/placeholder.test.ts b/packages/cli/test/placeholder.test.ts deleted file mode 100644 index 4cc4fd7..0000000 --- a/packages/cli/test/placeholder.test.ts +++ /dev/null @@ -1,3 +0,0 @@ -it("placeholder", () => { - expect(true).toBe(true); -});