You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 26, 2020. It is now read-only.
require() does not work in lotte tests. It would be awesome if we could require() our own modules though. In my tests, I usually startup my web server right in the test code, then inject dependencies in the web server and then I mock the desired behavior according to each test.
For example:
@base'http://localhost:10000'@title'Foo bar'
{WebServer} =require'../webserver'classEmptyApp_searchResult: []
searchStuff: (terms) ->return _searchResult;
app=newEmptyAppnewWebServer(10000, app).start=>@open'/', ->@describe'Search test', ->app._searchResult= ['foo', 'bar']
# do a search, submit the form, assert things, etc@success()