You've already forked dev-sidecar
mirror of
https://github.com/docmirror/dev-sidecar.git
synced 2025-11-26 14:10:40 +08:00
github-actions: 运行单元测试
This commit is contained in:
14
packages/mitmproxy/test/monkeyTest.js
Normal file
14
packages/mitmproxy/test/monkeyTest.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const assert = require('node:assert')
|
||||
const monkey = require('../src/lib/monkey')
|
||||
|
||||
let scripts
|
||||
try {
|
||||
scripts = monkey.load('../gui/extra/scripts/') // 相对于 mitmproxy 目录的相对路径,而不是当前 test 目录的。
|
||||
} catch {
|
||||
scripts = monkey.load('../../gui/extra/scripts/') // 相对于 当前 test 目录的相对路径
|
||||
}
|
||||
|
||||
// console.log(scripts)
|
||||
assert.strictEqual(scripts.github != null, true)
|
||||
assert.strictEqual(scripts.google != null, true)
|
||||
assert.strictEqual(scripts.tampermonkey != null, true)
|
||||
Reference in New Issue
Block a user