add code
This commit is contained in:
parent
8feeba0dd1
commit
46737d8f0f
@ -1,5 +1,9 @@
|
||||
{
|
||||
"fmt": {
|
||||
"indentWidth": 4
|
||||
},
|
||||
"tasks": {
|
||||
"check": "deno check main.ts",
|
||||
"test": "deno test"
|
||||
}
|
||||
}
|
||||
|
21
deno.lock
Normal file
21
deno.lock
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"version": "3",
|
||||
"packages": {
|
||||
"specifiers": {
|
||||
"jsr:@std/assert": "jsr:@std/assert@1.0.5",
|
||||
"jsr:@std/internal@^1.0.3": "jsr:@std/internal@1.0.3"
|
||||
},
|
||||
"jsr": {
|
||||
"@std/assert@1.0.5": {
|
||||
"integrity": "e37da8e4033490ce613eec4ac1d78dba1faf5b02a3f6c573a28f15365b9b440f",
|
||||
"dependencies": [
|
||||
"jsr:@std/internal@^1.0.3"
|
||||
]
|
||||
},
|
||||
"@std/internal@1.0.3": {
|
||||
"integrity": "208e9b94a3d5649bd880e9ca38b885ab7651ab5b5303a56ed25de4755fb7b11e"
|
||||
}
|
||||
}
|
||||
},
|
||||
"remote": {}
|
||||
}
|
4
main.ts
4
main.ts
@ -1 +1,3 @@
|
||||
console.log("hello world");
|
||||
import { message } from "./message.ts";
|
||||
|
||||
console.log(message());
|
||||
|
3
message.ts
Normal file
3
message.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export function message(): string {
|
||||
return "hello world";
|
||||
}
|
6
message_test.ts
Normal file
6
message_test.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { assertEquals } from "jsr:@std/assert";
|
||||
import { message } from "./message.ts";
|
||||
|
||||
Deno.test("message is correct", () => {
|
||||
assertEquals(message(), "hello world");
|
||||
});
|
Loading…
Reference in New Issue
Block a user