Skip to content

Commit

Permalink
test: Fix more fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
flovogt committed Mar 28, 2024
1 parent fd2aa82 commit 04854d4
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 59 deletions.
20 changes: 9 additions & 11 deletions test/fixtures/transpiler/amd/Require_Callback_2.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,21 @@ window.sap.ui.require(["my/module"], (Module) => {
window[sap.ui.require(["my/module"], (Module) => {
return Module;
})];
window.["window"]sap.ui.require(["my/module"], (Module) => {
window["window"].sap.ui.require(["my/module"], (Module) => {
return Module;
});

window.["sap"]["ui"]["require"](["my/module"], (Module) => {
window["sap"]["ui"]["require"](["my/module"], (Module) => {
return Module;
});

let val = sap.ui.require(["my/module"], (Module) => {
let val6 = sap.ui.require(["my/module"], (Module) => {
return Module;
});
let val2 = sap.ui.require(["my/module"], (Module) => {
let val7 = sap.ui.require(["my/module"], (Module) => {
return Module;
}) + 1;
let val3 = () => sap.ui.require(["my/module"], (Module) => {
let val8 = () => sap.ui.require(["my/module"], (Module) => {
return Module;
});

Expand All @@ -87,7 +87,7 @@ for (let i = 0; i < sap.ui.require(["my/module"], (Module) => {
})[i]
}

function () {
function fn1() {
sap.ui.require(["my/module"], (Module) => {
return Module;
});
Expand All @@ -103,7 +103,7 @@ function () {
return Module;
}));

var function () {
const fn2 = function () {
sap.ui.require(["my/module"], (Module) => {
return Module;
});
Expand All @@ -124,7 +124,7 @@ class MyClass {
});
[sap.ui.require(["my/module"], (Module) => {
return Module;
})]: "foo";
})] = "foo";
load() {
sap.ui.require(["my/module"], (Module) => {
return Module;
Expand All @@ -138,9 +138,7 @@ function* generatorFunction() {
});
}

var deps = ["my/module"], (Module) => {
return Module;
};
var deps = ["my/module"];
var callback = (MyModule) => {
console.log(MyModule);
};
Expand Down
16 changes: 8 additions & 8 deletions test/fixtures/transpiler/amd/Require_Import_2.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ const arr = [sap.ui.require(["my/module"]), sap.ui.require(["my/module"])];
let val = sap.ui.require(["my/module"]);
let val2 = sap.ui.require(["my/module"]) + 1;
let val3 = -sap.ui.require(["my/module"]);
let val5 = () => sap.ui.require(["my/module"]);
let val4 = () => sap.ui.require(["my/module"]);

window.sap.ui.require(["my/module"]);
window[sap.ui.require(["my/module"])];
window.["sap"].ui.require(["my/module"]);
window["sap"].ui.require(["my/module"]);

let val = sap.ui.require(["my/module"]);
let val2 = sap.ui.require(["my/module"]) + 1;
let val3 = () => sap.ui.require(["my/module"]);
let val5 = sap.ui.require(["my/module"]);
let val6 = sap.ui.require(["my/module"]) + 1;
let val7 = () => sap.ui.require(["my/module"]);

new val(sap.ui.require(["my/module"]))(sap.ui.require(["my/module"]));

Expand All @@ -42,7 +42,7 @@ for (let i = 0; i < sap.ui.require(["my/module"]); i++) {
sap.ui.require(["my/module"])[i]
}

function () {
function fn1() {
sap.ui.require(["my/module"]);
}

Expand All @@ -52,7 +52,7 @@ function () {

(() => sap.ui.require(["my/module"]));

var function () {
const fn2 = function () {
sap.ui.require(["my/module"]);
}

Expand All @@ -63,7 +63,7 @@ const obj1 = {

class MyClass {
prop1 = sap.ui.require(["my/module"]);
[sap.ui.require(["my/module"])]: "foo";
[sap.ui.require(["my/module"])] = "foo";
load() {
sap.ui.require(["my/module"])
}
Expand Down
16 changes: 8 additions & 8 deletions test/fixtures/transpiler/amd/Require_Probing_2.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ const arr = [sap.ui.require("my/module"), sap.ui.require("my/module")];
let val = sap.ui.require("my/module");
let val2 = sap.ui.require("my/module") + 1;
let val3 = -sap.ui.require("my/module");
let val5 = () => sap.ui.require("my/module");
let val4 = () => sap.ui.require("my/module");

window.sap.ui.require("my/module");
window[sap.ui.require("my/module")];
window.["sap"].ui.require("my/module");
window["sap"].ui.require("my/module");

let val = sap.ui.require("my/module");
let val2 = sap.ui.require("my/module") + 1;
let val3 = () => sap.ui.require("my/module");
let val5 = sap.ui.require("my/module");
let val6 = sap.ui.require("my/module") + 1;
let val7 = () => sap.ui.require("my/module");

new val(sap.ui.require("my/module"))(sap.ui.require("my/module"));

Expand All @@ -43,7 +43,7 @@ for (let i = 0; i < sap.ui.require("my/module"); i++) {
sap.ui.require("my/module")[i]
}

function () {
function fn1() {
sap.ui.require("my/module");
}

Expand All @@ -53,7 +53,7 @@ function () {

(() => sap.ui.require("my/module"));

var function () {
const fn2 = function () {
sap.ui.require("my/module");
}

Expand All @@ -64,7 +64,7 @@ const obj1 = {

class MyClass {
prop1 = sap.ui.require("my/module");
[sap.ui.require("my/module")]: "foo";
[sap.ui.require("my/module")] = "foo";
load() {
sap.ui.require("my/module")
}
Expand Down
Loading

0 comments on commit 04854d4

Please sign in to comment.