feat: 新增包文件

This commit is contained in:
duanshuwen
2025-11-15 22:41:50 +08:00
parent 7b65193e5c
commit 7ada85f175
104 changed files with 11273 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
import { expect } from 'chai'
import { session } from 'electron'
import { ElectronChromeExtensions } from '../'
describe('Extensions', () => {
const testSession = session.fromPartition('test-extensions')
const extensions = new ElectronChromeExtensions({
license: 'internal-license-do-not-use' as any,
session: testSession,
})
it('retrieves the instance with fromSession()', () => {
expect(ElectronChromeExtensions.fromSession(testSession)).to.equal(extensions)
})
it('throws when two instances are created for session', () => {
expect(() => {
new ElectronChromeExtensions({
license: 'internal-license-do-not-use' as any,
session: testSession,
})
}).to.throw()
})
})