File size: 428 Bytes
61d39e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const chai = require('chai');
chai.use(require('chai-as-promised'))
const expect = chai.expect;

module.exports = {
    name: 'whoami',
    description: 'a demo test for puterjs',
    do: async t => {
        const puter = t.puter;

        await t.case('demo (whoami)', async () => {
            const result = await puter.auth.whoami();
            expect(result.username).to.equal('admin');
        });
    }
}