Skip to content
Permalink
Browse files
fix(create): Use filename without scope when generating imports from …
…test file
  • Loading branch information
evocateur committed Jul 30, 2018
1 parent aa6d3d0 commit acfd48bd3d899965d27a79763bd2e50c2706e752
Showing 1 changed file with 3 additions and 3 deletions.
@@ -399,7 +399,7 @@ class CreateCommand extends Command {
writeTestFile() {
const testContent = this.options.esModule
? dedent`
import ${this.camelName} from '../src/${this.pkgName}';
import ${this.camelName} from '../src/${this.dirName}';
describe('${this.pkgName}', () => {
it('needs tests');
@@ -424,15 +424,15 @@ class CreateCommand extends Command {
this.options.esModule
? dedent`
import factory from 'yargs/yargs';
import ${this.camelName} from './${this.pkgName}';
import ${this.camelName} from './${this.dirName}';
export default cli;
`
: dedent`
'use strict';
const yargs = require('yargs/yargs');
const ${this.camelName} = require('./${this.pkgName}');
const ${this.camelName} = require('./${this.dirName}');
module.exports = cli;
`,

0 comments on commit acfd48b

Please sign in to comment.