diff --git a/src/assets/models/index.js b/src/assets/models/index.js index b823833e..7872564f 100644 --- a/src/assets/models/index.js +++ b/src/assets/models/index.js @@ -19,7 +19,12 @@ if (config.use_env_variable) { fs .readdirSync(__dirname) .filter(file => { - return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js'); + return ( + file.indexOf('.') !== 0 && + file !== basename && + file.slice(-3) === '.js' && + file.indexOf('.test.js') === -1 + ); }) .forEach(file => { const model = require(path.join(__dirname, file))(sequelize, Sequelize.DataTypes);