Skip to content

Commit

Permalink
Hoist important arrays to top-level constants
Browse files Browse the repository at this point in the history
  • Loading branch information
James M. Greene authored and James M. Greene committed Aug 5, 2022
1 parent 7c3932f commit 1395534
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/set-pages-path.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const { getTempFolder, compareFiles } = require('./test-helpers')
// Get the temp folder
const tempFolder = getTempFolder()

const SUPPORTED_GENERATORS = ['next', 'nuxt', 'gatsby']
const SUPPORTED_FILE_EXTENSIONS = ['.js', '.cjs', '.mjs']

// Test suite
describe('configParser', () => {
beforeEach(() => {
Expand All @@ -22,7 +25,7 @@ describe('configParser', () => {
})

// Iterate over the static site generators
;['next', 'nuxt', 'gatsby'].forEach(staticSiteGenerator => {
SUPPORTED_GENERATORS.forEach(staticSiteGenerator => {
// Folder containing the fixtures for a given static site generator
const fixtureFolder = `${__dirname}/fixtures/${staticSiteGenerator}`

Expand Down Expand Up @@ -61,7 +64,8 @@ describe('configParser', () => {
compareFiles(settings.configurationFile, expectedFile)
})
})
;['.js', '.cjs', '.mjs'].forEach(fileExtension => {

SUPPORTED_FILE_EXTENSIONS.forEach(fileExtension => {
// Iterate over the fixtures, outputting to specified configuration file path
configurationFiles
.filter(filename => filename.endsWith(fileExtension))
Expand Down

0 comments on commit 1395534

Please sign in to comment.