Skip to content

Commit

Permalink
fix(create): Use filename without scope when generating imports from …
Browse files Browse the repository at this point in the history
…test file
  • Loading branch information
evocateur committed Jul 30, 2018
1 parent aa6d3d0 commit acfd48b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions commands/create/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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;
`,
Expand Down

0 comments on commit acfd48b

Please sign in to comment.