(position, spec)
| 1172 | |
| 1173 | describe('compareDocumentPosition', () => { |
| 1174 | function expectPosition(position, spec) { |
| 1175 | const positionResult = { |
| 1176 | following: (position & Node.DOCUMENT_POSITION_FOLLOWING) !== 0, |
| 1177 | preceding: (position & Node.DOCUMENT_POSITION_PRECEDING) !== 0, |
| 1178 | contains: (position & Node.DOCUMENT_POSITION_CONTAINS) !== 0, |
| 1179 | containedBy: (position & Node.DOCUMENT_POSITION_CONTAINED_BY) !== 0, |
| 1180 | disconnected: (position & Node.DOCUMENT_POSITION_DISCONNECTED) !== 0, |
| 1181 | implementationSpecific: |
| 1182 | (position & Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC) !== 0, |
| 1183 | }; |
| 1184 | expect(positionResult).toEqual(spec); |
| 1185 | } |
| 1186 | // @gate enableFragmentRefs |
| 1187 | it('returns the relationship between the fragment instance and a given node', async () => { |
| 1188 | const fragmentRef = React.createRef(); |
no test coverage detected