Skip to content

Commit 9040f28

Browse files
committed
feat: export defaultFormats
1 parent d12bf7e commit 9040f28

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ function rdfFetch (url, { factory = defaultFactory, formats = defaultFormats, ..
88

99
export {
1010
rdfFetch as default,
11+
defaultFormats,
1112
Headers
1213
}

test/defaultFormats.test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { strictEqual } from 'assert'
2+
import { describe, it } from 'mocha'
3+
import { defaultFormats } from '../index.js'
4+
5+
describe('defaultFormats', () => {
6+
it('should be an object', () => {
7+
strictEqual(typeof defaultFormats, 'object')
8+
})
9+
10+
it('should implement the formats interface', () => {
11+
strictEqual(typeof defaultFormats.parsers, 'object')
12+
strictEqual(typeof defaultFormats.serializers, 'object')
13+
})
14+
})

0 commit comments

Comments
 (0)