Bug 1854214 - Add tests for getRealmConfiguration and getBuildConfiguration r=mgaudet

Differential Revision: https://phabricator.services.mozilla.com/D189037
This commit is contained in:
Vinny Diehl 2023-10-04 16:51:36 +00:00
Родитель b30a7e19e7
Коммит 1326cc854c
1 изменённых файлов: 23 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,23 @@
/**
* This tests APIs that are relied on by external consumers such as fuzzers,
* which could be broken if modified with regard only to in-tree code.
*/
// getRealmConfiguration and getBuildConfiguration
// If API changes are planned here, be sure to notify anyone who is fuzzing SM.
config = getRealmConfiguration();
assertEq(typeof config, "object");
for (const [key, value] of Object.entries(config)) {
assertEq(getRealmConfiguration(key), value);
}
config = getBuildConfiguration();
assertEq(typeof config, "object");
for (const [key, value] of Object.entries(config)) {
assertEq(getBuildConfiguration(key), value);
}