mirror of
https://github.com/maptiler/tileserver-gl.git
synced 2024-09-11 12:05:41 +03:00
* chore: make sure error exit codes of tests are returned Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com> * chore: replace the last 'var' with 'const' Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com> * chore: extract duplicated font listing Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com> * chore: extract rendering functions to a new file Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com> * chore: move nested respondImage() function to top level Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com> * chore: simplify respondImage() args Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com> * chore: fix typo in rendeAttribution Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com> --------- Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
29 lines
609 B
JavaScript
29 lines
609 B
JavaScript
process.env.NODE_ENV = 'test';
|
|
|
|
import { expect } from 'chai';
|
|
import supertest from 'supertest';
|
|
import { server } from '../src/server.js';
|
|
|
|
global.expect = expect;
|
|
global.supertest = supertest;
|
|
|
|
before(function () {
|
|
console.log('global setup');
|
|
process.chdir('test_data');
|
|
const running = server({
|
|
configPath: 'config.json',
|
|
port: 8888,
|
|
publicUrl: '/test/',
|
|
});
|
|
global.app = running.app;
|
|
global.server = running.server;
|
|
return running.startupPromise;
|
|
});
|
|
|
|
after(function () {
|
|
console.log('global teardown');
|
|
global.server.close(function () {
|
|
console.log('Done');
|
|
});
|
|
});
|