...
 
Commits (1)
const PORT = 12345;
const app = require('./app.js');
describe('OpenStreetMap opening hours', () => {
beforeAll(() => {
app.listen(PORT);
});
test('jo', () => {
});
});
const WebThingHTTPTester = require('webthing-http-tester');
const app = require('../src/app.js');
describe('OpenStreetMap opening hours', () => {
let server, tester;
beforeAll(() => {
return new Promise((resolve) => {
server = app.listen(0, () => {
const port = server.address().port;
tester = new WebThingHTTPTester({
path: '/osm/node/1/opening-hours',
port,
});
resolve();
});
});
});
afterAll(() => {
server.close();
});
test('things definition', async () => {
const response = await tester.getResponse('/');
expect(response).toMatchSnapshot();
});
});