https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 858dccf8a31476e97a978c4a433eb1766270ae8e authored by Anne van Kesteren on 15 October 2018, 09:37:30 UTC
no hex or oct digits
Tip revision: 858dccf
storage-smoke-test.tentative.https.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>Async local storage storage export smoke test</title>

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<script type="module">
import { testVariousMethodsWithDefaultArea } from "./helpers/als-tests.js";
import { storage } from "std:async-local-storage";

test(() => {
  const { backingStore } = storage;
  assert_array_equals(Object.keys(backingStore), ["database", "store", "version"]);
  assert_own_property(backingStore, "database");
  assert_own_property(backingStore, "store");
  assert_own_property(backingStore, "version");
  assert_equals(Object.getPrototypeOf(backingStore), Object.prototype);

  assert_equals(backingStore.database, "async-local-storage:default");
  assert_equals(backingStore.store, "store");
  assert_equals(backingStore.version, 1);
}, "backingStore returns the correct object");

testVariousMethodsWithDefaultArea(
  "Storage methods smoke test with string key and value", "key", "value", assert_equals
);
</script>
back to top