Skip to content

Commit

Permalink
gentesthtml - include package-name
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Apr 30, 2023
1 parent aad999c commit 144b720
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion array.test.js
Expand Up @@ -35,7 +35,7 @@ export const testIsarrayPerformance = _tc => {
})
t.assert(collectedArrays === N / 2)
})
t.assert(timeIsarray < timeConstructor * 1.3, 'Expecting that isArray is not much worse than a constructor check')
t.assert(timeIsarray < timeConstructor * 2, 'Expecting that isArray is not much worse than a constructor check')
}

/**
Expand Down
5 changes: 3 additions & 2 deletions bin/gentesthtml.js
Expand Up @@ -45,13 +45,14 @@ const readPkg = (pkgJson, pathPrefix, importMap) => {
})
}

readPkg(JSON.parse(fs.readFileSync('./package.json', { encoding: 'utf8' })), '.', exports)
const rootPkgJson = JSON.parse(fs.readFileSync('./package.json', { encoding: 'utf8' }))
readPkg(rootPkgJson, '.', exports)

const testHtml = `
<!DOCTYPE html>
<html>
<head>
<title>Testing lib0</title>
<title>Testing ${rootPkgJson.name}</title>
<script type="importmap">
{
"imports": ${JSON.stringify(exports, null, 2)},
Expand Down

0 comments on commit 144b720

Please sign in to comment.