We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dda54d commit 098b579Copy full SHA for 098b579
js/js_test.go
@@ -287,6 +287,17 @@ func TestDate(t *testing.T) {
287
}
288
289
290
+// https://github.com/gopherjs/gopherjs/issues/287
291
+func TestInternalizeDate(t *testing.T) {
292
+ var a = time.Unix(0, (123 * time.Millisecond).Nanoseconds())
293
+ var b time.Time
294
+ js.Global.Set("internalizeDate", func(t time.Time) { b = t })
295
+ js.Global.Call("eval", "(internalizeDate(new Date(123)))")
296
+ if a != b {
297
+ t.Fail()
298
+ }
299
+}
300
+
301
func TestEquality(t *testing.T) {
302
if js.Global.Get("Array") != js.Global.Get("Array") || js.Global.Get("Array") == js.Global.Get("String") {
303
t.Fail()
0 commit comments