Skip to content
File

Blob: src/workerd/api/tests/autogate-disabled-test.js

javascript22 lines
1// Copyright (c) 2025 Cloudflare, Inc.
2// Licensed under the Apache 2.0 license found in the LICENSE file or at:
3// https://opensource.org/licenses/Apache-2.0
4// Test that verifies autogates are DISABLED.
5// This test only runs in the default variant (all-autogates variant is disabled).
6 
7import { strictEqual } from 'node:assert';
8import unsafe from 'workerd:unsafe';
9 
10export const autogateDisabledTest = {
11 test() {
12 // In the default variant, WORKERD_ALL_AUTOGATES env var is NOT set,
13 // so isTestAutogateEnabled() should return false.
14 const isEnabled = unsafe.isTestAutogateEnabled();
15 strictEqual(
16 isEnabled,
17 false,
18 'TEST_WORKERD autogate should be DISABLED in default variant'
19 );
20 },
21};