Skip to content

Commit

Permalink
fix: avoid test paths
Browse files Browse the repository at this point in the history
  • Loading branch information
devtin committed Feb 10, 2021
1 parent 01bc1e0 commit 8c9f43a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/duck-storage-di.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import Promise from 'bluebird'

const { Schema } = Duckfficer

const loaderExtensions = ['!__tests__', '!*.unit.js', '!*.spec.js', '!*.test.js', '*.js', '*.mjs']

const upperCamelCase = (s) => {
return startCase(s).replace(/[\s]+/g, '')
}
Expand Down Expand Up @@ -46,8 +48,8 @@ const loadRacks = async ({
const duckRackModelPath = path.join(dir, rackName, modelPath)
const duckRackMethodsPath = path.join(dir, rackName, methodsPath)

const duckData = await jsDirIntoJson(duckRackModelPath)
const duckRackMethods = isDir(duckRackMethodsPath) ? await jsDirIntoJson(duckRackMethodsPath) : undefined
const duckData = await jsDirIntoJson(duckRackModelPath, { extensions: loaderExtensions })
const duckRackMethods = isDir(duckRackMethodsPath) ? await jsDirIntoJson(duckRackMethodsPath, { extensions: loaderExtensions }) : undefined

const duckModel = new Duck({
schema: duckData.schema instanceof Schema ? duckData.schema : new Schema(duckData.schema, { methods: injectContainerInMethods(container, duckData.methods) })
Expand Down

0 comments on commit 8c9f43a

Please sign in to comment.