feat: replace private workspaces with private usernames (#1783)

This commit is contained in:
Mo
2022-10-12 13:52:34 -05:00
committed by GitHub
parent 038e456c6a
commit 18c821d8eb
12 changed files with 84 additions and 108 deletions

View File

@@ -1,25 +0,0 @@
chai.use(chaiAsPromised)
const expect = chai.expect
import * as Factory from './lib/factory.js'
describe('private workspaces', () => {
it('generates identifier', async () => {
const userphrase = 'myworkspaceuserphrase'
const name = 'myworkspacename'
const result = await ComputePrivateWorkspaceIdentifier(new SNWebCrypto(), userphrase, name)
expect(result).to.equal('5155c13a44f333790f6564fbcee0c35a16d26a8359dd77d67d8ecc6ad5d399bb')
})
it('application result matches direct function call', async () => {
const userphrase = 'myworkspaceuserphrase'
const name = 'myworkspacename'
const application = (await Factory.createAppContextWithRealCrypto()).application
const appResult = await application.computePrivateWorkspaceIdentifier(userphrase, name)
const directResult = await ComputePrivateWorkspaceIdentifier(new SNWebCrypto(), userphrase, name)
expect(appResult).to.equal(directResult)
})
})