Commit 561aa837 authored by Christian Paul's avatar Christian Paul 🦊

Start with a test for the Opening Hours Thing

parent 5e39b3fe
Pipeline #71863335 failed with stage
in 1 minute and 23 seconds
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();
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment