Skip to content

Commit

Permalink
Repair tests on CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjeffburke committed May 2, 2020
1 parent 2954f9b commit 07e4161
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/convertMarkdownToMocha.spec.js
Expand Up @@ -4,6 +4,8 @@ var convertMarkdownToMocha = require('../lib/convertMarkdownToMocha');
var esprima = require('esprima');
var escodegen = require('escodegen');

var projectPath = require('path').resolve(__dirname, '..');

function codeToString(obj) {
var ast;
if (typeof obj === 'function') {
Expand All @@ -29,7 +31,7 @@ var expect = require('unexpected')
'}'
),
'to equal',
codeToString(value)
codeToString(value).replace(/<projectPath>/g, projectPath)
);
});

Expand Down Expand Up @@ -68,7 +70,7 @@ describe('convertMarkdownToMocha', function () {
{
marker: 'unexpected-markdown',
capture: 'return',
pwdPath: '/Users/alex/Documents/projects/unexpected-markdown',
pwdPath: '<projectPath>',
fileGlobals: { expect: () => expect.clone() },
}
);
Expand Down Expand Up @@ -118,7 +120,7 @@ describe('convertMarkdownToMocha', function () {
{
marker: 'unexpected-markdown',
capture: 'return',
pwdPath: '/Users/alex/Documents/projects/unexpected-markdown',
pwdPath: '<projectPath>',
fileGlobals: { expect: () => expect.clone() },
}
);
Expand Down Expand Up @@ -182,7 +184,7 @@ describe('convertMarkdownToMocha', function () {
{
marker: 'unexpected-markdown',
capture: 'return',
pwdPath: '/Users/alex/Documents/projects/unexpected-markdown',
pwdPath: '<projectPath>',
fileGlobals: { expect: () => expect.clone() },
}
);
Expand Down Expand Up @@ -243,7 +245,7 @@ describe('convertMarkdownToMocha', function () {
{
marker: 'unexpected-markdown',
capture: 'return',
pwdPath: '/Users/alex/Documents/projects/unexpected-markdown',
pwdPath: '<projectPath>',
fileGlobals: { expect: () => expect.clone() },
}
);
Expand Down Expand Up @@ -320,7 +322,7 @@ describe('convertMarkdownToMocha', function () {
{
marker: 'unexpected-markdown',
capture: 'return',
pwdPath: '/Users/alex/Documents/projects/unexpected-markdown',
pwdPath: '<projectPath>',
fileGlobals: { expect: () => expect.clone() },
}
);
Expand Down

0 comments on commit 07e4161

Please sign in to comment.