Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
os: add test for signals constant immutability
  • Loading branch information
Xstoudi committed Dec 13, 2025
commit c66f71d92de50b3f61c2f8da29c9fe69ea8df3fc
12 changes: 12 additions & 0 deletions test/parallel/test-os-constants-signals.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';

const common = require('../common');

Check failure on line 3 in test/parallel/test-os-constants-signals.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

'common' is assigned a value but never used
const { test } = require('node:test');
const assert = require('node:assert');
const { constants } = require('node:os');

const { internalBinding } = require('internal/test/binding');

Check failure on line 8 in test/parallel/test-os-constants-signals.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

'internalBinding' is assigned a value but never used

test('Verify that signals constant is immutable', () => {
assert.throws(() => constants.signals.FOOBAR = 1337, TypeError);

Check failure on line 11 in test/parallel/test-os-constants-signals.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Expected indentation of 2 spaces but found 4
})

Check failure on line 12 in test/parallel/test-os-constants-signals.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Missing semicolon

Check failure on line 12 in test/parallel/test-os-constants-signals.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Newline required at end of file but not found
Loading