All tests file imports changed from commonjs to es-module

This commit is contained in:
2022-08-24 19:46:29 +02:00
parent f08640c274
commit 2765154c45
19 changed files with 153 additions and 137 deletions

View File

@@ -1,11 +1,9 @@
const User = require("../../src/user/user");
const UserSecurity = require("../../src/user/userSecurity");
import User from "../../src/user/user.js";
import UserSecurity from "../../src/user/userSecurity.js";
function createUser(username, password) {
export default function createUser(username, password) {
const userSecurity = new UserSecurity();
const user = new User(username);
return userSecurity.createNewUser(user, password);
}
module.exports = createUser;