migrations
This commit is contained in:
+7
-7
@@ -1,8 +1,8 @@
|
||||
import { Injector } from "../src/backend/Injector/Injector";
|
||||
import { FrontworkAdmin } from "../src/backend/Admin/Admin";
|
||||
import { T1, T2, Tiers } from "../src/backend/Types/Items";
|
||||
import { T2, Tiers } from "../src/backend/Types/Items";
|
||||
|
||||
import { RPCSocket } from "rpclibrary";
|
||||
import { RPCSocket, ConnectedSocket } from "rpclibrary";
|
||||
import { FrontcraftIfc, Auth, User, FrontcraftFeatureIfc, Raid, Character, Rank, Class, Race, Spec, Signup } from "../src/backend/Types/Types";
|
||||
import { SpecT } from "../src/backend/Types/PlayerSpecs";
|
||||
|
||||
@@ -120,8 +120,8 @@ describe('Frontcraft', () => {
|
||||
let auth: Auth,
|
||||
adminUser: User,
|
||||
server: FrontworkAdmin,
|
||||
client: RPCSocket & FrontcraftIfc,
|
||||
adminClient: RPCSocket & FrontcraftFeatureIfc,
|
||||
client: ConnectedSocket<FrontcraftIfc>,
|
||||
adminClient: ConnectedSocket<FrontcraftFeatureIfc>,
|
||||
raids: Raid[] = [],
|
||||
users: { [username in string]: { account: User, character: Character, auth: Auth, signup?: Signup, item?: string } } = {}
|
||||
|
||||
@@ -168,12 +168,12 @@ describe('Frontcraft', () => {
|
||||
}).then(adminUser => {
|
||||
|
||||
client.UserManager.login(adminUser.username, 'ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb').then(auth => {
|
||||
const sock = new RPCSocket(
|
||||
const sock = new RPCSocket<FrontcraftFeatureIfc>(
|
||||
auth.port,
|
||||
"localhost"
|
||||
)
|
||||
|
||||
sock.connect<any>(auth.token.value).then(cli => {
|
||||
sock.connect(auth.token.value).then(cli => {
|
||||
adminClient = cli
|
||||
sock.hook('kick', () => {
|
||||
console.log("I got kicked");
|
||||
@@ -240,7 +240,7 @@ describe('Frontcraft', () => {
|
||||
|
||||
it('should sign up', (done) => {
|
||||
Promise.all(Object.values(users).map((user) =>
|
||||
adminClient.signup.sign(user.auth.token.value, user.character, raids[0], false).catch(done)
|
||||
adminClient.signup.sign(user.auth.token.value, user.character, raids[0], false, ""+Math.floor(Math.random()*10000)).catch(done)
|
||||
)).then(x => {
|
||||
adminClient.signup.getSignups(raids[0]).then(s => {
|
||||
if (s.length == testAccounts.length) {
|
||||
|
||||
Reference in New Issue
Block a user