mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-12-01 17:25:15 +08:00
chore: 打包配置 测试用例
This commit is contained in:
1 parent
0abbda1160
commit
5276bce060
18 files changed
+621
-160
No files matched your search
@@ -58,7 +58,10 @@ describe('wechat-ilink account store', () => {
|
||||
expect(path).toBe(
|
||||
join(home, '.tracememo', 'wechat-connector', 'accounts', 'bot_abc-im-bot.json')
|
||||
)
|
||||
expect(statSync(path).mode & 0o777).toBe(0o600)
|
||||
// Windows 没有 POSIX 权限位,chmod 0600 是空操作 ⇒ 只在 POSIX 上断言。
|
||||
if (process.platform !== 'win32') {
|
||||
expect(statSync(path).mode & 0o777).toBe(0o600)
|
||||
}
|
||||
expect(loadAllCredentials(() => home)).toEqual([credentials])
|
||||
})
|
||||
|
||||
@@ -150,7 +153,10 @@ describe('wechat-ilink account store', () => {
|
||||
accountsDirectory(() => home),
|
||||
`${accountId}.context.json`
|
||||
)
|
||||
expect(statSync(path).mode & 0o777).toBe(0o600)
|
||||
// Windows 没有 POSIX 权限位,chmod 0600 是空操作 ⇒ 只在 POSIX 上断言。
|
||||
if (process.platform !== 'win32') {
|
||||
expect(statSync(path).mode & 0o777).toBe(0o600)
|
||||
}
|
||||
|
||||
const stored = JSON.parse(readFileSync(path, 'utf8')) as {
|
||||
tokens: Record<string, { context_token: string }>
|
||||
|
||||
Reference in new issue
Block a user