mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-03 12:02:53 +00:00
refactor: replace rfdc with native structuredClone
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {expect} from 'chai';
|
||||
import clone from 'rfdc';
|
||||
import {SCThingRemoteOrigin} from '../src/index.js';
|
||||
import {SCDishMeta} from '../src/index.js';
|
||||
import {SCThingTranslator} from '../src/index.js';
|
||||
@@ -164,7 +163,7 @@ describe('Translator', function () {
|
||||
|
||||
it('should omit LRU cache with changed source', function () {
|
||||
const translatorDE = new SCThingTranslator('de');
|
||||
const dishCopy = clone()(dish);
|
||||
const dishCopy = structuredClone(dish);
|
||||
const translatedDish = translatorDE.translatedAccess(dish);
|
||||
const destructivelyTranslatedDish = translatorDE.translate(dish);
|
||||
|
||||
@@ -224,7 +223,7 @@ describe('MetaTranslator', function () {
|
||||
});
|
||||
|
||||
it('should translate thing without meta class', function () {
|
||||
const dishCopy = clone()(dish);
|
||||
const dishCopy = structuredClone(dish);
|
||||
const typeNonExistent = eval("(x) => x + 'typeNonExistent';");
|
||||
// this will assign a non-existent SCThingType to dishCopy
|
||||
dishCopy.type = typeNonExistent();
|
||||
|
||||
Reference in New Issue
Block a user