Skip to content

Commit

Permalink
Unit test configuration added required webpack alias for xtext import…
Browse files Browse the repository at this point in the history
…s and fixed broken unit test.
  • Loading branch information
barnettwilliam committed Mar 13, 2024
1 parent 487d532 commit 004ed28
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions platform/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Karma configuration
// Generated on Fri Jan 27 2023 10:15:56 GMT+0000 (Greenwich Mean Time)
const path = require('path');

module.exports = function(config) {
config.set({
Expand Down Expand Up @@ -45,6 +46,13 @@ module.exports = function(config) {
mode: "development",
devtool: "inline-source-map",

resolve: {
alias: {
'xtext/xtext-ace$': path.resolve(__dirname, 'src/xtext/2.31.0/xtext-ace'),
'ace/range$': 'ace-builds/src-noconflict/ace',
}
},

module: {
rules: [
{
Expand Down
2 changes: 1 addition & 1 deletion platform/test/spec/testToolManagerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("ToolManager", () => {
// Check the expected results
expect(tm.toolsUrls).toHaveSize(TOOL_URLS.length);

for (const i in TOOL_URLS){
for (let i = 0; i < TOOL_URLS.length; i++ ){
expect(tm.toolsUrls[i].url).toEqual(TOOL_URLS[i]);
}
})
Expand Down

0 comments on commit 004ed28

Please sign in to comment.