Closed shaunc closed 9 years ago
We use qunit. What are the advantages of mocha?
I don't mind qunit, but I like
never used it but sounds good - go for it and show me how it's done
feels like each section in the readme should become a test suite and each sentence should be a subsuite
excellent...
... hmm...
Defining the window...
To specify the window, use the height and width attributes. The rowHeight attribute specifies the (outer) height of rows in the body of the grid.
describe('defining the window', ()=>{
describe('to specify the window size, use the height and width attributes', ()=>{
it('should size window to be 400x400', ()=>{
...
}
Something like that?
Each test should test exactly one thing, so tests for height and width individually within a suite. Suite names look good and understandable.
Just thinking that the way the readme is turning out, it's becoming a spec
I used to use cucumber and that was the idea there. Here you've just written the documentation assiduously :)
test module organization: We can put one test for each section per module in each file. ember has a default organization that we might want to be separate from as this is a bit different paradigm. Should I use ... say ... tests/specifications/<section-name>-test.js
?
or specs
rather than specifications
sounds good
I do more development in nodejs server side, where I use mocha all the time. Coming back to mocha in ember-cli now after a few months:
It seems in short the tooling I recommended is creaky. It does look like the tools are maintained so these issues will get resolved, but I thought I'd give you another shot: to you really want to learn mocha or not? It is nice, but that niceness is a bit obscured right now when working with ember-cli.
(btw will be mostly "in transit" travelling from Poland -> Boston tomorrow/today)
As noted, turning tail on ember-cli-mocha. Proposed new organization of tests:
spec/defining-the-window/
height-and-width-test.js
moduleForComponent(
'spec/defining-the-window/height-and-width/height', 'control layout by specifying height',
{integration: true});
test('set height renders whole to specified height', ... )
Any comments?
I just added tests in ember-cli-csp-style
(and fixed the code, so npm update your ember-grid
)
See what you think of my test style.
They look good to me.
@BryanCrotaz -- can we use ember-cli-mocha, or do you (and/or your developer) prefer qunit? I am going to go through and at least fix the default tests so that we have a passing build.