feat: add build
This commit is contained in:
@@ -39,6 +39,7 @@ describe('mqtt', () => {
|
||||
|
||||
it('should not be able to publish if not allowed', async () => {
|
||||
const [client] = await world.connect([]);
|
||||
// eslint-disable-next-line
|
||||
const promise = client.publishAsync('test', 'test');
|
||||
|
||||
// TODO: why does this not throw?
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Statement } from '#root/access/access.schemas.ts';
|
||||
import type { Statement } from '#root/auth/auth.schemas.ts';
|
||||
|
||||
const statements = {
|
||||
all: [
|
||||
|
||||
@@ -33,6 +33,16 @@ const createWorld = async (options: WorldOptions) => {
|
||||
backbone.services.set(Config, {
|
||||
jwtSecret: 'test',
|
||||
adminToken: 'test',
|
||||
api: {
|
||||
enabled: true,
|
||||
},
|
||||
ws: {
|
||||
enabled: true,
|
||||
},
|
||||
tcp: {
|
||||
enabled: false,
|
||||
port: 1883,
|
||||
},
|
||||
});
|
||||
const accessTokens = backbone.services.get(JwtAuth);
|
||||
backbone.sessionProvider.register('token', accessTokens);
|
||||
@@ -61,7 +71,7 @@ const createWorld = async (options: WorldOptions) => {
|
||||
},
|
||||
destroy: async () => {
|
||||
await Promise.all(sockets.map((s) => s.endAsync()));
|
||||
await fastify.close();
|
||||
await backbone.destroy();
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user