UNPKG

my-test123

Version:
58 lines 1.86 kB
/* * This class contains mock generator code for users, identities * and all depended entities. */ var UserMockGenerator = /** @class */ (function () { function UserMockGenerator() { } /* * Creates the logged in user structure. */ UserMockGenerator.prototype.getUser = function () { if (this.user) return this.user; else { this.user = { attributes: { fullName: 'Example User 0', imageURL: 'https://avatars.githubusercontent.com/u/2410471?v=3', username: 'example 0' }, id: 'user0', type: 'identities' }; return this.user; } }; /* * Creates the identities structure. */ UserMockGenerator.prototype.getAllUsers = function () { if (this.allusers) return this.allusers; else { this.allusers = [0, 1, 2, 3].map(function (i) { return { attributes: { fullName: 'Example User ' + i, imageURL: 'https://avatars.githubusercontent.com/u/241047' + (i + 1) + '?v=3', email: 'example' + i + '@email.exmp', bio: '', provider: 'kc2', url: '', username: 'example' + i }, links: { self: 'http://mock.service/api/user/user' + i }, id: 'user' + i, type: 'identities' }; }); return this.allusers; } }; return UserMockGenerator; }()); export { UserMockGenerator }; //# sourceMappingURL=user-mock-generator.js.map