Skip to content

Commit

Permalink
Fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
PalumboN committed Sep 16, 2024
1 parent 622d483 commit c1a9070
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import chai from 'chai'
import { mkdirSync, rmdirSync } from 'fs'
import { join } from 'path'
import sinon from 'sinon'
import run, { Options, buildEnvironmentForProgram, getAssetsFolder, getGameInterpreter, getAllAssets, getSoundsFolder, getVisuals, initializeGameClient } from '../src/commands/run'
import { spyCalledWithSubstring } from './assertions'
import { logger as fileLogger } from '../src/logger'
import { io as ioc } from 'socket.io-client'
import run, { buildEnvironmentForProgram, getAllAssets, getAssetsFolder, getGameInterpreter, getSoundsFolder, getVisuals, Options } from '../src/commands/run'
import { logger as fileLogger } from '../src/logger'
import { spyCalledWithSubstring } from './assertions'


chai.should()
Expand Down Expand Up @@ -80,12 +80,11 @@ describe('testing run', () => {
project: imageProject,
}

const io = initializeGameClient(options)!
const environment = await buildEnvironmentForProgram(options)
const interpreter = getGameInterpreter(environment, io)!
const interpreter = getGameInterpreter(environment)!
const game = interpreter.object('wollok.game.game')
interpreter.send('addVisual', game, interpreter.object('mainGame.elementoVisual'))
io.close()

// we can't use join in the image path since it's in Wollok project
expect(getVisuals(game, interpreter)).to.deep.equal([{
image: 'smalls/1.png',
Expand Down

0 comments on commit c1a9070

Please sign in to comment.