Comments (9)
from marionette-ref-impl.
I don't think we need to do the setTimout() in the before each, jasmine 1.x has a way to do this that we are not using. It uses the waits(). So if you are seeing setTimeout then the test is not being done correctly.
from marionette-ref-impl.
with Jasmine 2.0 there is an even better approach than using waits()
, they have a done
callback: this new approach is described at Upgrading Jasmine - Asynchronous Specs
However my approach here is to require the module outside of the describe
and then we would need no async feature at all :)
from marionette-ref-impl.
Same thing, different name. Grunt actually does async with the done() and it can be problematic.
from marionette-ref-impl.
The advantage of using done
is that if we have more than 1 callback they don't have to be nested, but they would be flattened instead by doing one block for each precondition. In order to ease that I have authored a very simple preCondition instruction for Jasmine 2.0's way of async testing: https://github.com/tiagorg/jasmine-precondition and also on NPM.
However for this case here, if we are able to use requireJS outside of the test we won't need to go down on this path. That would be cleaner I suppose
from marionette-ref-impl.
Are you using jasmine 2.0 or 2.1?
from marionette-ref-impl.
2.1, just noticed the title saying 2.0. We are using the latest to see how would it be like.
from marionette-ref-impl.
unified karma's and main's require-config here: f27b750
from marionette-ref-impl.
Improving the specs for application: a411bec
from marionette-ref-impl.
Related Issues (13)
- Get links to latest docs and approaches HOT 1
- Make a list of Utils and Components that we want to use in the reference implementation
- Get a fake data set for browse and facet
- Shell of Marionette implemented HOT 1
- Scaffold project like MacysUI HOT 5
- Set up Node server with JSON service and fake data with web.js file
- Start Travis CI integration HOT 1
- Set up Jasmine tests for server, migrate Jasmine tests, and Grunt tasks
- Convert StringUtil and Globals tests to Jasmine 2.0 HOT 2
- Patterns/Anti-Patterns to include
- Use Backbone View alongside Marionette Item View HOT 1
- Implement SASS compilation and delivery (based on MacysCSS) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from marionette-ref-impl.