Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ruyadorno committed Mar 3, 2021
1 parent bde39f7 commit 0c2eb0f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion __tests__/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const assert = require('yeoman-assert');
const helpers = require('yeoman-test');
const generatorGeneratorPkg = require('../package.json');

jest.mock('superb', () => () => "cat's meow");
jest.mock('superb', () => ({ random: () => "cat's meow" }));
jest.mock('npm-name', () => () => Promise.resolve(true));

describe('generator:app', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/subgenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const assert = require('yeoman-assert');
const helpers = require('yeoman-test');
const fs = require('fs');

jest.mock('superb', () => () => "cat's meow");
jest.mock('superb', () => ({ random: () => "cat's meow" }));

describe('generator:subgenerator', () => {
beforeEach(() => {
Expand Down
52 changes: 26 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"lint-staged": "^7.2.2",
"lodash": "^4.17.4",
"mkdirp": "^0.5.1",
"superb": "^3.0.0",
"superb": "^4.0.0",
"yeoman-generator": "^3.1.1",
"yosay": "^2.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion subgenerator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = class extends Generator {
this.destinationPath(path.join('generators', this.options.name, 'index.js')),
{
// Escape apostrophes from superb to not conflict with JS strings
superb: superb().replace("'", "\\'"),
superb: superb.random().replace("'", "\\'"),
generatorName
}
);
Expand Down

0 comments on commit 0c2eb0f

Please sign in to comment.