Skip to content

Commit b41d4a6

Browse files
committed
test(gen:endpoint): add snake-case tests
1 parent 53a24a3 commit b41d4a6

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

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

+27
Original file line numberDiff line numberDiff line change
@@ -254,4 +254,31 @@ describe('angular-fullstack:endpoint', function() {
254254
return jshintDir(dir, 'foo', 'foo/bar').should.be.fulfilled();
255255
});
256256
});
257+
258+
describe('with a generated snake-case endpoint', function() {
259+
var dir;
260+
beforeEach(function() {
261+
return runEndpointGen('foo-bar', {config: config['generator-angular-fullstack']}).then(_dir => {
262+
dir = _dir;
263+
264+
return Promise.all([
265+
copyAsync(path.join(genDir, '/server/.jshintrc'), './server/.jshintrc'),
266+
copyAsync(path.join(genDir, '/server/.jshintrc-spec'), './server/.jshintrc-spec'),
267+
copyAsync(path.join(genDir, '/.jscsrc'), './.jscsrc')
268+
]);
269+
});
270+
});
271+
272+
it('should generate the expected files', function() {
273+
assert.file(getExpectedFiles.endpoint('foo-bar'));
274+
});
275+
276+
it('should pass jscs', function() {
277+
return jscsDir(dir, 'foo-bar').should.be.fulfilled();
278+
});
279+
280+
it('should pass lint', function() {
281+
return jshintDir(dir, 'foo-bar').should.be.fulfilled();
282+
});
283+
});
257284
});

0 commit comments

Comments
 (0)