Why is my intern test failing with “document is not defined”

夙愿已清 提交于 2019-11-29 12:27:00

It looks like you’re trying to load some code using the Node.js client that requires a browser environment. This won’t work. You should only load the ev/tests/FilterGrid test suite in a browser. You can do this by modifying your Intern configuration file to look something like this:

define([ 'intern/node_modules/dojo/has' ], function (has) {
  var suites = [];

  if (has('host-browser')) {
    suites.push('ev/tests/FilterGrid');
  }

  return {
    // ...your existing configuration...
    suites: suites,
    // ...
  };
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!