From d3d90ae1371ca3767067835da3aaa68c15d7f9bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20B=C4=83rbulescu?= Date: Sat, 22 Oct 2022 01:25:19 +0300 Subject: [PATCH] Deterministic testing --- __tests__/__snapshots__/basic.js.snap | 12 ++++++------ __tests__/basic.js | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/__tests__/__snapshots__/basic.js.snap b/__tests__/__snapshots__/basic.js.snap index a1f08be..4cf182b 100644 --- a/__tests__/__snapshots__/basic.js.snap +++ b/__tests__/__snapshots__/basic.js.snap @@ -1,20 +1,20 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`instance is unchanged 1`] = ` -Array [ - "length", - "name", +[ "arguments", "caller", - "prototype", "indent", + "length", + "name", + "prototype", ] `; exports[`is unchanged 1`] = ` -Array [ +[ "length", - "prototype", "name", + "prototype", ] `; diff --git a/__tests__/basic.js b/__tests__/basic.js index 3fedf82..0512aad 100644 --- a/__tests__/basic.js +++ b/__tests__/basic.js @@ -7,7 +7,7 @@ it('exists', () => { }); it('is unchanged', () => { - expect(Object.getOwnPropertyNames(StrOP)).toMatchSnapshot(); + expect(Object.getOwnPropertyNames(StrOP).sort()).toMatchSnapshot(); }); describe('instance', () => { @@ -32,7 +32,7 @@ describe('instance', () => { }); it('is unchanged', () => { - expect(Object.getOwnPropertyNames(new StrOP('Basic'))).toMatchSnapshot(); + expect(Object.getOwnPropertyNames(new StrOP('Basic')).sort()).toMatchSnapshot(); }); it('tags strings', () => {