Convert to esm module syntax (#606)
* switch to esm module * Update package.json * change to maplibre package * fix tests * eslint * remove extra package updates * Delete package-lock.json * change 'fs' to 'node:fs' * put back node 10. without the package updates this still works * remove trailing commas * remove unassociated fix / formatting * remove unassociated fix * remove eslint from this PR * remove unassociated fix * lint * Merge remote-tracking branch 'upstream/master' into esm_update * fix mlgl * update maplibre-native to new version with arm64 * update minor version
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
process.env.NODE_ENV = 'test';
|
||||
|
||||
global.should = require('should');
|
||||
global.supertest = require('supertest');
|
||||
import {expect} from 'chai';
|
||||
import supertest from 'supertest';
|
||||
import {server} from '../src/server.js';
|
||||
|
||||
require = require('esm')(module);
|
||||
global.expect = expect;
|
||||
global.supertest = supertest;
|
||||
|
||||
before(function() {
|
||||
console.log('global setup');
|
||||
process.chdir('test_data');
|
||||
var running = require('../src/server')({
|
||||
const running = server({
|
||||
configPath: 'config.json',
|
||||
port: 8888,
|
||||
publicUrl: '/test/'
|
||||
@@ -20,5 +22,7 @@ before(function() {
|
||||
|
||||
after(function() {
|
||||
console.log('global teardown');
|
||||
global.server.close(function() { console.log('Done'); process.exit(); });
|
||||
global.server.close(function() {
|
||||
console.log('Done'); process.exit();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user