Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Aug 8, 2024
1 parent ff8f15d commit 9897b27
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion products/jbrowse-cli/src/commands/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default class Upgrade extends JBrowseCommand {
}

if (clean) {
fs.rmSync(path.join(argsPath, 'static'), { recursive: true })
fs.rmSync(path.join(argsPath, 'static'), { recursive: true, force: true })
fs.readdirSync(argsPath)
.filter(f => f.includes('worker.js'))
.forEach(f => fs.unlinkSync(path.join(argsPath, f)))
Expand Down
2 changes: 1 addition & 1 deletion products/jbrowse-cli/src/testUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export async function runInTmpDir(
await callbackFn({ dir, originalDir })
} finally {
if (dir) {
fs.rmSync(dir, { recursive: true })
fs.rmSync(dir, { recursive: true, force: true })
}
process.chdir(originalDir)
}
Expand Down
2 changes: 1 addition & 1 deletion products/jbrowse-web/src/tests/Alignments.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ test('opens an alignments track and clicks feature', async () => {
expectCanvasMatch(await f1.findByTestId(pv('1..4000-0'), ...opts))
expectCanvasMatch(await f2.findByTestId(pv('1..4000-0'), ...opts))

const track = await findAllByTestId('pileup')
const track = await findAllByTestId('pileup-overlay')
fireEvent.mouseMove(track[0], { clientX: 200, clientY: 20 })
fireEvent.click(track[0], { clientX: 200, clientY: 40 })
fireEvent.mouseDown(track[0], { clientX: 200, clientY: 20 })
Expand Down
2 changes: 1 addition & 1 deletion webpack/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = function buildWebpack(config) {
.then(previousFileSizes => {
// Remove all content but keep the directory so that
// if you're in it, you don't end up in Trash
fs.rmSync(paths.appBuild, { recursive: true })
fs.rmSync(paths.appBuild, { recursive: true, force: true })
// Merge with the public folder
copyPublicFolder()
// Start the webpack build
Expand Down

0 comments on commit 9897b27

Please sign in to comment.