From 6ab75dbb8b132036e40e42a628a182efde85472a Mon Sep 17 00:00:00 2001
From: Niklas von Hertzen <niklasvh@gmail.com>
Date: Sun, 11 Jul 2021 19:20:19 +0800
Subject: [PATCH] fix: testrunner rollup config

---
 tests/rollup.config.ts | 18 ++++++++----------
 tests/tsconfig.json    |  6 ++++--
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/tests/rollup.config.ts b/tests/rollup.config.ts
index 58b40a6..fe7796c 100644
--- a/tests/rollup.config.ts
+++ b/tests/rollup.config.ts
@@ -1,8 +1,8 @@
-import nodeResolve from 'rollup-plugin-node-resolve';
-import commonjs from 'rollup-plugin-commonjs';
+import nodeResolve from '@rollup/plugin-node-resolve';
+import commonjs from '@rollup/plugin-commonjs';
 import sourceMaps from 'rollup-plugin-sourcemaps';
-import typescript from 'rollup-plugin-typescript2';
-import json from 'rollup-plugin-json';
+import typescript from '@rollup/plugin-typescript';
+import json from '@rollup/plugin-json';
 import {resolve} from 'path';
 
 const pkg = require('../package.json');
@@ -36,14 +36,12 @@ export default {
         // Allow json resolution
         json(),
         // Compile TypeScript files
-        typescript({useTsconfigDeclarationDir: true, tsconfig: resolve(__dirname, 'tsconfig.json')}),
+        typescript({
+            tsconfig: resolve(__dirname, 'tsconfig.json')
+        }),
         // Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
         commonjs({
-            include: 'node_modules/**',
-            namedModules: {
-                'node_modules/platform/platform.js': ['name', 'version'],
-                'node_modules/es6-promise/dist/es6-promise.js': ['Promise']
-            }
+            include: 'node_modules/**'
         }),
 
         // Resolve source maps to the original source
diff --git a/tests/tsconfig.json b/tests/tsconfig.json
index 168f060..1f9ee88 100644
--- a/tests/tsconfig.json
+++ b/tests/tsconfig.json
@@ -1,6 +1,8 @@
 {
     "extends": "../tsconfig.json",
     "compilerOptions": {
-        "types": ["node", "mocha"]
-    }
+        "types": ["node", "mocha"],
+        "rootDir": "../"
+    },
+    "include": ["**/*.ts"]
 }