constant.js
import terminalKit from 'terminal-kit';
const term = terminalKit.terminal;
export default term;
function.js
export default function init (term) {
term('Welcome to the mining game!')
}
gameEngine.js
import init from "./functions.js"
export default function startMiningGame (term) {
init(term);
}
solution.js
import startMiningGame from "./gameEngine.js"
import term from "./constants.js"
startMiningGame(term);
Тестовый запуск работает.
проверка задачи Ошибка:● Test suite failed to run Cannot spy the init property because it is not a function; undefined given instead
Кто знает в чем причина ?