Skip to content

Commit 6666ddb

Browse files
committed
fix(gen:test): endpoint gen before should be inside the describe
else it would run before every suite, not just that suite
1 parent a644812 commit 6666ddb

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

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

+19-19
Original file line numberDiff line numberDiff line change
@@ -123,26 +123,26 @@ function jscsDir(dir, name, folder) {
123123
var config;
124124
var genDir;
125125

126-
before(function() {
127-
return Promise.all([
128-
runGen(defaultOptions).then(_dir => {
129-
genDir = _dir;
130-
131-
return fs.readFileAsync(path.join(genDir, '.jscsrc'), 'utf8').then(data => {
132-
jscs.configure(JSON.parse(data));
133-
});
134-
}),
135-
readJSON(path.join(TEST_DIR, 'fixtures/.yo-rc.json')).then(_config => {
136-
_config['generator-angular-fullstack'].insertRoutes = false;
137-
_config['generator-angular-fullstack'].pluralizeRoutes = false;
138-
_config['generator-angular-fullstack'].insertSockets = false;
139-
_config['generator-angular-fullstack'].insertModels = false;
140-
config = _config;
141-
})
142-
]);
143-
});
144-
145126
describe('angular-fullstack:endpoint', function() {
127+
before(function() {
128+
return Promise.all([
129+
runGen(defaultOptions).then(_dir => {
130+
genDir = _dir;
131+
132+
return fs.readFileAsync(path.join(genDir, '.jscsrc'), 'utf8').then(data => {
133+
jscs.configure(JSON.parse(data));
134+
});
135+
}),
136+
readJSON(path.join(TEST_DIR, 'fixtures/.yo-rc.json')).then(_config => {
137+
_config['generator-angular-fullstack'].insertRoutes = false;
138+
_config['generator-angular-fullstack'].pluralizeRoutes = false;
139+
_config['generator-angular-fullstack'].insertSockets = false;
140+
_config['generator-angular-fullstack'].insertModels = false;
141+
config = _config;
142+
})
143+
]);
144+
});
145+
146146
describe(`with a generated endpont 'foo'`, function() {
147147
var dir;
148148
beforeEach(function() {

0 commit comments

Comments
 (0)