From 5ea0df99698a0a34a5e893be03f715aff3b8fe96 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 8 Aug 2018 17:51:51 +0200 Subject: [PATCH] Fixes #54899: Do not attempt to use real css loader in mocha unit tests --- test/all.js | 1 + test/css.mock.js | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 test/css.mock.js diff --git a/test/all.js b/test/all.js index 14c6897b197..2222c8995e9 100644 --- a/test/all.js +++ b/test/all.js @@ -49,6 +49,7 @@ function main() { nodeMain: __filename, baseUrl: path.join(path.dirname(__dirname), 'src'), paths: { + 'vs/css': '../test/css.mock', 'vs': `../${ out }/vs`, 'lib': `../${ out }/lib`, 'bootstrap': `../${ out }/bootstrap` diff --git a/test/css.mock.js b/test/css.mock.js new file mode 100644 index 00000000000..1829c6ae48e --- /dev/null +++ b/test/css.mock.js @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +define([], function() { + return { + load: function(name, req, load) { + load({}); + } + }; +});