summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/specs/init/lib/__test__.jsonc16
-rw-r--r--tests/specs/init/lib/dry_publish.out7
-rw-r--r--tests/specs/init/lib/init.out14
-rw-r--r--tests/specs/init/lib/test.out14
4 files changed, 51 insertions, 0 deletions
diff --git a/tests/specs/init/lib/__test__.jsonc b/tests/specs/init/lib/__test__.jsonc
new file mode 100644
index 000000000..076930ae6
--- /dev/null
+++ b/tests/specs/init/lib/__test__.jsonc
@@ -0,0 +1,16 @@
+{
+ "tempDir": true,
+ "steps": [{
+ "args": "init --lib project",
+ "output": "init.out"
+ }, {
+ "cwd": "project",
+ "args": "test",
+ "output": "test.out"
+ }, {
+ "cwd": "project",
+ "args": "publish --dry-run",
+ "output": "dry_publish.out",
+ "exitCode": 1
+ }]
+}
diff --git a/tests/specs/init/lib/dry_publish.out b/tests/specs/init/lib/dry_publish.out
new file mode 100644
index 000000000..31f91c38d
--- /dev/null
+++ b/tests/specs/init/lib/dry_publish.out
@@ -0,0 +1,7 @@
+Check file:///[WILDLINE]/mod.ts
+Checking for slow types in the public API...
+Check file:///[WILDLINE]/mod.ts
+error: Failed preparing 'project'.
+
+Caused by:
+ Invalid package name, use '@<scope_name>/<package_name> format
diff --git a/tests/specs/init/lib/init.out b/tests/specs/init/lib/init.out
new file mode 100644
index 000000000..0f1a83f30
--- /dev/null
+++ b/tests/specs/init/lib/init.out
@@ -0,0 +1,14 @@
+✅ Project initialized
+
+Run these commands to get started
+
+ cd project
+
+ # Run the tests
+ deno test
+
+ # Run the tests and watch for file changes
+ deno task dev
+
+ # Publish to JSR (dry run)
+ deno publish --dry-run
diff --git a/tests/specs/init/lib/test.out b/tests/specs/init/lib/test.out
new file mode 100644
index 000000000..0b225a52b
--- /dev/null
+++ b/tests/specs/init/lib/test.out
@@ -0,0 +1,14 @@
+Download http://127.0.0.1:4250/@std/assert/meta.json
+Download http://127.0.0.1:4250/@std/assert/0.220.1_meta.json
+[UNORDERED_START]
+Download http://127.0.0.1:4250/@std/assert/0.220.1/mod.ts
+Download http://127.0.0.1:4250/@std/assert/0.220.1/assert_equals.ts
+Download http://127.0.0.1:4250/@std/assert/0.220.1/assert.ts
+Download http://127.0.0.1:4250/@std/assert/0.220.1/fail.ts
+[UNORDERED_END]
+Check file:///[WILDLINE]/mod_test.ts
+running 1 test from ./mod_test.ts
+addTest ... ok ([WILDLINE])
+
+ok | 1 passed | 0 failed ([WILDLINE])
+