Skip to content

Commit

Permalink
fix: temporary use absolute paths for mock requires
Browse files Browse the repository at this point in the history
  • Loading branch information
evenstensberg authored and okonet committed Feb 24, 2017
1 parent 5ad4f5d commit b3be2c8
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion __mocks__/inquirer/initialize.mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Rx = require('rx');
const got = require('got');
const questions = require('../../lib/utils/initial-questions');
//eslint-disable-next-line
const prompt = require('prompt.mock');
const prompt = require('./prompt.mock');
const initialConfig = jest.genMockFromModule('../../lib/utils/initial-config');


Expand Down
2 changes: 1 addition & 1 deletion lib/inquirer-prompt.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

describe('inquirer-prompt', () => {
//eslint-disable-next-line
const {init} = require('initialize.mock');
const {init} = require('../__mocks__/inquirer/initialize.mock');

it('should provide with basic options if no argument is supplied to init', async () => {
let itInits = await init(null, {
Expand Down
2 changes: 1 addition & 1 deletion lib/parser/validate-options.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe('validate-options', () => {
//eslint-disable-next-line
const {validateOptions} = require('validate-options.mock');
const {validateOptions} = require('../../__mocks__/parser/validate-options.mock');

it('should throw on fake paths', () => {
expect(() => {
Expand Down
3 changes: 1 addition & 2 deletions lib/utils/npm-exists.spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* eslint node/no-unsupported-features: 0 */
'use strict';
const {exists} = require('../../__mocks__/inquirer/initialize.mock');

describe('exists', () => {
//eslint-disable-next-line
const {exists} = require('initialize.mock');

it('should sucessfully existence of a published module', async () => {
let itExists = await exists('webpack-addons-ylvis');
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/resolve-packages.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe('resolve-packages', () => {
// eslint-disable-next-line
const getLoc = require('resolve.mock');
const getLoc = require('../../__mocks__/inquirer/resolve.mock');
let moduleLoc;

afterEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/validate-addons.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

describe('validate-addons', () => {
//eslint-disable-next-line
const {validateAddons} = require('initialize.mock');
const {validateAddons} = require('../../__mocks__/inquirer/initialize.mock');

it('should validate multiple packages if supplied', async () => {
let itValidatesAddon = await validateAddons(['webpack-addons-ylvis', 'webpack-addons-noop']);
Expand Down

0 comments on commit b3be2c8

Please sign in to comment.