Skip to content

Commit

Permalink
Add install tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Amphiluke committed Jan 27, 2024
1 parent d90ba28 commit 867c49a
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 6 deletions.
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions .husky/pre-commit
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
},
"type": "module",
"scripts": {
"prepare": "husky install",
"lint": "eslint src/**/*.mjs test/**/*.mjs",
"test": "node --test test/potprox.test.mjs test/potentials/",
"build": "rollup -c"
"build": "rollup -c",
"prepare": "husky"
},
"files": [
"dist",
Expand Down
3 changes: 3 additions & 0 deletions test/install-test/node-cjs-test.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
let potprox = require("potprox");

console.dir(potprox);
3 changes: 3 additions & 0 deletions test/install-test/node-esm-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import * as potprox from "potprox";

console.dir(potprox);
22 changes: 22 additions & 0 deletions test/install-test/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions test/install-test/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "potprox-install-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Amphiluke",
"license": "MIT",
"dependencies": {
"potprox": "file:../../potprox-0.8.0.tgz"
}
}

0 comments on commit 867c49a

Please sign in to comment.