Skip to content

armgit / moli

Public Imported from GitHub
0

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

638 B
Raw Blame
"use strict";
importScripts("/resources/testharness.js");

test(() => {
  assert_true(self.hasOwnProperty("name"), "property exists on the global");
  assert_equals(self.name, "my name");
}, `name property value for ${self.constructor.name}`);

test(() => {
  self.name = "something new";
  const propDesc = Object.getOwnPropertyDescriptor(self, "name");
  assert_equals(propDesc.value, "something new", "value");
  assert_true(propDesc.configurable, "configurable");
  assert_true(propDesc.writable, "writable");
  assert_true(propDesc.enumerable, "enumerable");
}, `name property is replaceable for ${self.constructor.name}`);

done();