Skip to content

Commit a24643a

Browse files
committed
test(gen:main): add 'with TypeScript, Jade, Jasmine, LESS, & OAuth' suite
1 parent df20c8e commit a24643a

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

Diff for: src/test/main.test.js

+66
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,70 @@ describe('angular-fullstack:app', function() {
210210
return runCmd('grunt test:server').should.be.fulfilled();
211211
});
212212
});
213+
214+
describe('with TypeScript, Jade, Jasmine, LESS, & OAuth', function() {
215+
var dir;
216+
var testOptions = {
217+
buildtool: 'grunt',
218+
transpiler: 'ts',
219+
markup: 'jade',
220+
stylesheet: 'less',
221+
router: 'uirouter',
222+
testing: 'jasmine',
223+
odms: ['mongoose'],
224+
auth: true,
225+
oauth: ['twitterAuth', 'facebookAuth', 'googleAuth'],
226+
socketio: true,
227+
bootstrap: true,
228+
uibootstrap: true
229+
};
230+
231+
beforeEach(function() {
232+
return runGen(testOptions).then(_dir => {
233+
dir = _dir;
234+
});
235+
});
236+
237+
it('should generate the proper files', function() {
238+
const expectedFiles = getExpectedFiles.app(testOptions);
239+
assert.file(expectedFiles);
240+
return assertOnlyFiles(expectedFiles, path.normalize(dir)).should.be.fulfilled();
241+
});
242+
243+
it('passes JSCS', function() {
244+
return runCmd('grunt jscs').should.be.fulfilled();
245+
});
246+
247+
it('passes lint', function() {
248+
return runCmd('grunt tslint').should.be.fulfilled();
249+
});
250+
251+
it('should run client tests successfully', function() {
252+
return runCmd('grunt test:client').should.be.fulfilled();
253+
});
254+
255+
it('should run server tests successfully', function() {
256+
return runCmd('grunt test:server').should.be.fulfilled();
257+
});
258+
259+
describe('with a generated endpoint', function() {
260+
beforeEach(function() {
261+
getConfig(path.join(dir, '.yo-rc.json')).then(config => {
262+
return runEndpointGen('foo', {config: config['generator-angular-fullstack']});
263+
});
264+
});
265+
266+
it('should run server tests successfully', function() {
267+
return runCmd('grunt test:server').should.be.fulfilled();
268+
});
269+
});
270+
271+
if(!process.env.SKIP_E2E) {
272+
it('should run e2e tests successfully');
273+
274+
//it('should run e2e tests successfully for production app', function (done) {
275+
// runTest('grunt test:e2e:prod', this, done, 240000);
276+
//});
277+
}
278+
});
213279
});

0 commit comments

Comments
 (0)