Skip to content

Commit ffdbfb7

Browse files
committed
feature: gritty: default export
1 parent e291dbd commit ffdbfb7

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

server/gritty.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ const choose = (a, b, options) => {
4444
return options.default;
4545
};
4646

47-
export const gritty = (options = {}) => {
47+
export default gritty;
48+
49+
export function gritty(options = {}) {
4850
const router = Router();
4951
const {prefix = '/gritty'} = options;
5052

test/exports.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import {test} from 'supertape';
2+
3+
test('gritty: exports', async (t) => {
4+
const gritty = await import('#gritty/server');
5+
t.equal(gritty.default, gritty.gritty);
6+
t.end();
7+
});

0 commit comments

Comments
 (0)