Просмотр исходного кода

Keep the IDE out of the Node test runner.

test_runner.js died at load with "document is not defined": the IDE
package imports its stylesheets through css!, and require-css inlines
them behind an injector that writes a style element.

Faking CodeMirror, as Helios now does, is not enough here. The IDE
imports its stylesheets itself and requires them again when it loads,
and amdefine, having no map, cannot find the css plugin they name; past
that, jQuery UI and the IDE's class initialization expect a browser.

The IDE is stubbed as jquery is. It is a browser tool without tests;
the runner still loads Benchfib and Examples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Herby Vojčík 2 дней назад
Родитель
Сommit
942f3bc537
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      Gruntfile.js

+ 1 - 0
Gruntfile.js

@@ -102,6 +102,7 @@ module.exports = function (grunt) {
                     mainConfigFile: "config.js",
                     mainConfigFile: "config.js",
                     rawText: {
                     rawText: {
                         "jquery": "/* do not load in node test runner */",
                         "jquery": "/* do not load in node test runner */",
+                        "amber/legacy/IDE": "/* do not load in node test runner */",
                         "__app__": "(" + function () {
                         "__app__": "(" + function () {
                             define(["testing", "amber/core/Platform-Node", "amber_devkit/NodeTestRunner"], function (amber) {
                             define(["testing", "amber/core/Platform-Node", "amber_devkit/NodeTestRunner"], function (amber) {
                                 amber.initialize().then(function () {
                                 amber.initialize().then(function () {