@contentful/field-editor-shared 4.6.1-canary.2 → 4.6.1-canary.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -303,16 +303,10 @@ const _useLocalePublishStatus = require("./useLocalePublishStatus");
|
|
|
303
303
|
const { result } = (0, _reacthooks.renderHook)(()=>(0, _useLocalePublishStatus.useLocalePublishStatus)(undefined, localesAPI));
|
|
304
304
|
(0, _vitest.expect)(result.current).toBeUndefined();
|
|
305
305
|
});
|
|
306
|
-
_vitest.it
|
|
307
|
-
{},
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
sys: null
|
|
313
|
-
}
|
|
314
|
-
])('returns undefined when entity metadata is missing (%j)', (entity)=>{
|
|
315
|
-
const { result } = (0, _reacthooks.renderHook)(()=>(0, _useLocalePublishStatus.useLocalePublishStatus)(entity, localesAPI));
|
|
306
|
+
(0, _vitest.it)('returns undefined when entity metadata is missing', ()=>{
|
|
307
|
+
const { result } = (0, _reacthooks.renderHook)(()=>(0, _useLocalePublishStatus.useLocalePublishStatus)({
|
|
308
|
+
sys: null
|
|
309
|
+
}, localesAPI));
|
|
316
310
|
(0, _vitest.expect)(result.current).toBeUndefined();
|
|
317
311
|
});
|
|
318
312
|
});
|
|
@@ -5,12 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
const _vitest = require("vitest");
|
|
6
6
|
const _entityHelpers = require("./entityHelpers");
|
|
7
7
|
(0, _vitest.describe)('getEntityStatus', ()=>{
|
|
8
|
-
_vitest.test.each([
|
|
9
|
-
undefined,
|
|
10
|
-
null
|
|
11
|
-
])('rejects missing metadata (%s)', (sys)=>{
|
|
12
|
-
(0, _vitest.expect)(()=>(0, _entityHelpers.getEntityStatus)(sys)).toThrow(new TypeError('Invalid entity metadata object'));
|
|
13
|
-
});
|
|
14
8
|
function createEntity(props) {
|
|
15
9
|
return props;
|
|
16
10
|
}
|
|
@@ -299,16 +299,10 @@ describe('useLocalePublishStatus', ()=>{
|
|
|
299
299
|
const { result } = renderHook(()=>useLocalePublishStatus(undefined, localesAPI));
|
|
300
300
|
expect(result.current).toBeUndefined();
|
|
301
301
|
});
|
|
302
|
-
it
|
|
303
|
-
{}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
sys: null
|
|
309
|
-
}
|
|
310
|
-
])('returns undefined when entity metadata is missing (%j)', (entity)=>{
|
|
311
|
-
const { result } = renderHook(()=>useLocalePublishStatus(entity, localesAPI));
|
|
302
|
+
it('returns undefined when entity metadata is missing', ()=>{
|
|
303
|
+
const { result } = renderHook(()=>useLocalePublishStatus({
|
|
304
|
+
sys: null
|
|
305
|
+
}, localesAPI));
|
|
312
306
|
expect(result.current).toBeUndefined();
|
|
313
307
|
});
|
|
314
308
|
});
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test } from 'vitest';
|
|
2
2
|
import { getEntityStatus, getResolvedImageUrl } from './entityHelpers';
|
|
3
3
|
describe('getEntityStatus', ()=>{
|
|
4
|
-
test.each([
|
|
5
|
-
undefined,
|
|
6
|
-
null
|
|
7
|
-
])('rejects missing metadata (%s)', (sys)=>{
|
|
8
|
-
expect(()=>getEntityStatus(sys)).toThrow(new TypeError('Invalid entity metadata object'));
|
|
9
|
-
});
|
|
10
4
|
function createEntity(props) {
|
|
11
5
|
return props;
|
|
12
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-shared",
|
|
3
|
-
"version": "4.6.1-canary.
|
|
3
|
+
"version": "4.6.1-canary.4+58a62d60",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"prettier --write"
|
|
82
82
|
]
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "58a62d6001e9287cdb913ea8476b7584b8a3ae3b"
|
|
85
85
|
}
|