Skip to content

Commit

Permalink
Merge pull request #2817 from alphagov/build-package-tests-mjs
Browse files Browse the repository at this point in the history
Avoid copying tests ending in `.mjs` to package folder
  • Loading branch information
36degrees committed Aug 30, 2022
2 parents dc55e43 + 3ff4a46 commit 1abe3e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tasks/gulp/__tests__/after-build-package.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('package/', () => {
const expectedPackageFiles = () => {
const filesToIgnore = [
'.DS_Store',
'*.test.js',
'*.test.*',
'*.yaml',
'*.snap',
'*/govuk/README.md'
Expand Down
6 changes: 5 additions & 1 deletion tasks/gulp/copy-to-destination.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ function generateFixtures (file) {
}

gulp.task('js:copy-esm', () => {
return gulp.src([configPaths.src + '**/*.mjs', configPaths.src + '**/*.js', '!' + configPaths.src + '/**/*.test.js'])
return gulp.src([
`${configPaths.src}**/*.mjs`,
`${configPaths.src}**/*.js`,
`!${configPaths.src}**/*.test.*`
])
.pipe(gulp.dest(taskArguments.destination + '/govuk-esm/'))
})

Expand Down

0 comments on commit 1abe3e3

Please sign in to comment.