Skip to content

Commit

Permalink
Fix tests - normalize-space.js
Browse files Browse the repository at this point in the history
  • Loading branch information
joewiz committed Mar 23, 2021
1 parent d3a38e2 commit 8901041
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/mocha/app_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ describe('file system checks', function () {
if (fs.existsSync('build.xml')) {
const build = fs.readFileSync('build.xml', 'utf8')
const parsed = new xmldoc.XmlDocument(build)
var buildDesc = parsed.childNamed('description').val
var buildDesc = parsed.childNamed('description').val.replace(/\s+/g,'')
}

if (fs.existsSync('package.json')) {
const pkg = fs.readFileSync('package.json', 'utf8')
const parsed = JSON.parse(pkg)
var pkgDesc = parsed.description
var pkgDesc = parsed.description.replace(/\s+/g,'')
}

if (fs.existsSync('repo.xml')) {
const repo = fs.readFileSync('repo.xml', 'utf8')
const parsed = new xmldoc.XmlDocument(repo)
var repoDesc = parsed.childNamed('description').val
var repoDesc = parsed.childNamed('description').val.replace(/\s+/g,'')
}

const desc = [buildDesc, pkgDesc, repoDesc].filter(Boolean)
Expand Down

0 comments on commit 8901041

Please sign in to comment.