简体   繁体   中英

regular expression to set the unit test files path

I am new to regular expression I have a scenario where i need to set the files in my test case config file

    var webpackConfig = require('./webpack.store1.config.js');

module.exports = function(config) {
    config.set({
        basePath: '',

        frameworks: ['jasmine'],

        files: [ 

               ],

        exclude: [],

        coverageReporter: {
            type: 'html',
            dir: 'coverage/'
        },

I have series of components and each component has nested components

I want to have regular expression where it can find the test case file (anything.test.js) in each component level

below is the structure of my application 在此处输入图片说明

Any help would be appreciated.

just put that ./**/*.test.js .

It means that it will look recursively in all the folders for files with .test.js suffix.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM