karma config将文件移动到基​​目录

时间:2017-09-06 00:47:16

标签: requirejs karma-runner

有没有办法将Karma配置中加载的文件移动到新目录,例如/base/?我有一个包含源文件的外部项目。我可以通过../../directory加载文件。但是,它会将文件插入/absolute/文件夹。如果我在另一台计算机上加载测试,则/absolute/的目录会有所不同。是否有预处理器或我缺少的配置?我搜索了业力文档,但无法找到我要找的东西。

 // list of files / patterns to load in the browser
files: [   
    { pattern: 'node_modules/jquery/dist/jquery.min.js', included: false },
    { pattern: 'node_modules/knockout/build/output/knockout-latest.js', included: false },
    { pattern: 'node_modules/knockout-mapping/dist/knockout.mapping.min.js', included: false },
    { pattern: 'node_modules/knockout-postbox/build/knockout-postbox.min.js', included: false },
    { pattern: '../FantasyFootball/wwwroot/js/site.js', included: false, served: true, watched: true },
    { pattern: 'tests/*.js', included: false },
    { pattern: 'test-main.js', included: true }         
],

0 个答案:

没有答案