Skip to content

Commit

Permalink
fix test to remove let t declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
mununki committed Feb 7, 2022
1 parent 72d237d commit f620b55
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 22 deletions.
9 changes: 3 additions & 6 deletions lib/js/tests/Webapi/Dom/Webapi__Dom__CustomEvent__test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ $$event.stopPropagation();

var Detail = {};

var t = {
component: "test-component"
};

var EventWithDetail = Webapi__Dom__CustomEvent.Make(Detail);

var eventWithDetail = new CustomEvent("event-with-detail");

var eventWithOptions = new CustomEvent("event-with-detail", t);
var eventWithOptions = new CustomEvent("event-with-detail", {
component: "test-component"
});

Curry._1(EventWithDetail.eventPhase, eventWithDetail);

Expand All @@ -43,7 +41,6 @@ eventWithOptions.stopPropagation();

exports.$$event = $$event;
exports.Detail = Detail;
exports.t = t;
exports.EventWithDetail = EventWithDetail;
exports.eventWithDetail = eventWithDetail;
exports.eventWithOptions = eventWithOptions;
Expand Down
9 changes: 3 additions & 6 deletions lib/js/tests/Webapi/Dom/Webapi__Dom__EventTarget__test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@ target.dispatchEvent(customEvent);

var Detail = {};

var t = {
test: "test"
};

var EventWithDetail = Webapi__Dom__CustomEvent.Make(Detail);

var typedCustomEvent = new CustomEvent("event-with-detail", t);
var typedCustomEvent = new CustomEvent("event-with-detail", {
test: "test"
});

target.dispatchEvent(typedCustomEvent);

Expand All @@ -57,7 +55,6 @@ exports.$$event = $$event;
exports.handleClick = handleClick;
exports.customEvent = customEvent;
exports.Detail = Detail;
exports.t = t;
exports.EventWithDetail = EventWithDetail;
exports.typedCustomEvent = typedCustomEvent;
/* target Not a pure module */
9 changes: 4 additions & 5 deletions tests/Webapi/Dom/Webapi__Dom__CustomEvent__test.res
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ module Detail = {
type t = {component: string}
}

let t: Detail.t = {
component: "test-component",
}

module EventWithDetail = Make(Detail)
let eventWithDetail = EventWithDetail.make("event-with-detail")
let eventWithOptions = EventWithDetail.makeWithOptions("event-with-detail", t)
let eventWithOptions = EventWithDetail.makeWithOptions(
"event-with-detail",
{component: "test-component"},
)

/* Event */
let _ = EventWithDetail.bubbles(eventWithDetail)
Expand Down
6 changes: 1 addition & 5 deletions tests/Webapi/Dom/Webapi__Dom__EventTarget__test.res
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ module Detail = {
type t = {test: string}
}

let t: Detail.t = {
test: "test",
}

module EventWithDetail = CustomEvent.Make(Detail)
let typedCustomEvent = EventWithDetail.makeWithOptions("event-with-detail", t)
let typedCustomEvent = EventWithDetail.makeWithOptions("event-with-detail", {test: "test"})
let _ = target->dispatchEvent(typedCustomEvent)

0 comments on commit f620b55

Please sign in to comment.