(raw)
| 1909 | const capabilityOrder = ['read', 'createFolder', 'write', 'moveRename', 'delete']; |
| 1910 | |
| 1911 | const normalizeCapabilities = (raw) => { |
| 1912 | if (!raw || typeof raw !== 'object') return {}; |
| 1913 | const out = {}; |
| 1914 | capabilityOrder.forEach((key) => { |
| 1915 | if (!Object.prototype.hasOwnProperty.call(raw, key)) return; |
| 1916 | const value = raw[key]; |
| 1917 | out[key] = (value === true) ? true : ((value === false) ? false : null); |
| 1918 | }); |
| 1919 | return out; |
| 1920 | }; |
| 1921 | |
| 1922 | const getCapabilityState = (key, testState) => { |
| 1923 | const checks = Array.isArray(testState?.checks) ? testState.checks : []; |
no outgoing calls
no test coverage detected