Skip to content

Commit

Permalink
Remove importmap (#12)
Browse files Browse the repository at this point in the history
* Remove importmap

* test: Add basic distro testing in ci
  • Loading branch information
littletof authored Apr 24, 2024
1 parent 3ba659f commit ec328cd
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,18 @@ jobs:

- name: Running tests
if: matrix.config.kind == 'test'
run: deno task test
run: deno task test
distro:
name: Check distros
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Install deno
uses: denolib/setup-deno@master
with:
deno-version: 1.42.4

- name: Runs without importmap
run: deno test --allow-read=. --allow-net --no-config ./test/ci-distributions.ts
4 changes: 0 additions & 4 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
"test": "deno test --coverage=./cov --allow-read=./test",
"coverage": "deno task test && deno coverage --html ./cov"
},
"imports": {
"@std/fmt": "jsr:@std/[email protected]",
"@std/testing": "jsr:@std/[email protected]"
},
"exports": {
".": "./mod.ts",
"./example": "./example.ts",
Expand Down
2 changes: 1 addition & 1 deletion deps.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * as colors from "@std/fmt/colors";
export * as colors from "jsr:@std/fmt@0.223.0/colors";

import { gfmStrikethrough, gfmStrikethroughFromMarkdown, mdast } from "./mdast-util-from-markdown@1_2_0-shimmed.js";
export const strikethroughExt = gfmStrikethroughFromMarkdown;
Expand Down
10 changes: 10 additions & 0 deletions test/ci-distributions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
"../mod.ts",
"https://deno.land/x/charmd/mod.ts",
"jsr:@littletof/charmd",
].forEach((distro) => {
Deno.test(distro, async () => {
const dist = await import(distro);
const _rendered = dist.renderMarkdown(`### ${distro}`);
});
});
2 changes: 1 addition & 1 deletion test/renderMarkdown.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals, equal } from "@std/testing/asserts";
import { assertEquals, equal } from "jsr:@std/testing@0.223.0/asserts";
import { demoText } from "../example.ts";
import { renderMarkdown } from "../mod.ts";

Expand Down

0 comments on commit ec328cd

Please sign in to comment.