Skip to content

Commit

Permalink
Add test that path is passed to compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
Demivan committed Jul 25, 2023
1 parent b376b34 commit c93375b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions fixtures/compilers/knip.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
module.exports = {
compilers: {
md: text => text,
mdx: async text => text,
md: (text, path) => {
if (!path)
throw new Error('Path not passed to compiler')

return text
},
mdx: async (text, path) => {
if (!path)
throw new Error('Path not passed to compiler')

return text
},
},
};

0 comments on commit c93375b

Please sign in to comment.