Skip to content

Commit

Permalink
fix(class): filter spec templates
Browse files Browse the repository at this point in the history
  • Loading branch information
garritfra committed Jun 19, 2022
1 parent 8e4a812 commit 3ab21dc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion src/lib/class/class.factory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ describe('Class Factory', () => {
.runSchematicAsync('class', options)
.toPromise();
const files: string[] = tree.files;
console.log(files);

expect(
files.find((filename) => filename === '/foo.entity.spec.ts'),
Expand Down
3 changes: 1 addition & 2 deletions src/lib/class/class.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ function generate(options: ClassOptions): Source {
options.spec
? noop()
: filter((path) => {
const specNamingConvention = options.specFileSuffix || 'spec';
const languageExtension = options.language || 'ts';
const suffix = `.${specNamingConvention}.${languageExtension}`;
const suffix = `.__specFileSuffix__.${languageExtension}`;
return !path.endsWith(suffix);
}),
template({
Expand Down

0 comments on commit 3ab21dc

Please sign in to comment.