Skip to content
This repository was archived by the owner on Apr 18, 2022. It is now read-only.

Commit e0f3de6

Browse files
authored
Add FakeTime and improve documentation (#6)
* Refactor, update ci, and add FakeTime * Improve assert and add tests * Make browser compatible * Update deno * Finish implementing FakeTime * Update deno ci * Fix intermittent test failure * Remove intermittent tests * Pass deno lint * Improve README.md and upgrade deno
1 parent 6e951a7 commit e0f3de6

27 files changed

+1990
-577
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,36 @@ jobs:
2222
- name: Install deno
2323
uses: denolib/setup-deno@master
2424
with:
25-
deno-version: 1.0.0
25+
deno-version: 1.2.3
2626
- name: Check formatting
2727
if: matrix.config.kind == 'lint'
28-
run: deno fmt --check
28+
run: |
29+
deno fmt --check
30+
deno lint --unstable
2931
- name: Test
3032
if: matrix.config.kind == 'test'
3133
run: deno test
32-
- name: Release
33-
uses: softprops/action-gh-release@v1
34+
- name: Release info
3435
if: |
3536
matrix.config.kind == 'test' &&
3637
github.repository == 'udibo/mock' &&
3738
startsWith(github.ref, 'refs/tags/')
39+
shell: bash
40+
run: |
41+
echo ::set-env name=RELEASE_VERSION::${GITHUB_REF/refs\/tags\//}
42+
- name: Bundle
43+
if: |
44+
env.RELEASE_VERSION != '' &&
45+
startsWith(matrix.config.os, 'ubuntu')
46+
run: |
47+
mkdir -p target/release
48+
deno bundle mod.ts target/release/mock_${RELEASE_VERSION}.js
49+
- name: Release
50+
uses: softprops/action-gh-release@v1
51+
if: env.RELEASE_VERSION != ''
3852
env:
3953
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4054
with:
4155
draft: true
56+
files: |
57+
target/release/mock_${{ env.RELEASE_VERSION }}.js

.vscode/launch.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Launch via deno run",
6+
"type": "node",
7+
"request": "launch",
8+
"cwd": "${workspaceFolder}",
9+
"runtimeExecutable": "deno",
10+
"runtimeArgs": ["run", "--inspect-brk", "${file}"],
11+
"port": 9229
12+
},
13+
{
14+
"name": "Launch via deno test",
15+
"type": "node",
16+
"request": "launch",
17+
"cwd": "${workspaceFolder}",
18+
"runtimeExecutable": "deno",
19+
"runtimeArgs": ["test", "--inspect-brk", "${file}"],
20+
"port": 9229
21+
}
22+
]
23+
}

0 commit comments

Comments
 (0)