File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ const templates = {
2828 }
2929}
3030
31+ module . exports . templates = templates
32+
3133const convert = async function ( template ) {
3234 /*
3335 - things to add from cutenode/action-meeting
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ const { suite, test } = require('mocha')
33const assert = require ( 'assert' )
44const { DateTime } = require ( 'luxon' )
55const pkg = require ( '../package.json' )
6+ const { convert, templates } = require ( '../lib/conversions' )
67const meetings = require ( '../lib/meetings' )
78
89suite ( `${ pkg . name } unit` , ( ) => {
@@ -18,3 +19,22 @@ suite(`${pkg.name} unit`, () => {
1819 assert . deepStrictEqual ( next . toISO ( ) , DateTime . fromISO ( '2020-04-16T13:00:00.0Z' ) . toISO ( ) )
1920 } )
2021} )
22+
23+ test ( 'shorthands transform' , async ( ) => {
24+ templates . values . title = 'Test Meeting'
25+ templates . values . agendaLabel = 'meeting-agenda'
26+ templates . values . invitees = '@pkgjs/meet'
27+ templates . values . observers = '@nodejs/package-maintenance'
28+
29+ const input = `# <!-- title -->
30+ <!-- agenda label -->
31+ <!-- invitees -->
32+ <!-- observers -->`
33+
34+ const output = `# Test Meeting
35+ meeting-agenda
36+ @pkgjs/meet
37+ @nodejs/package-maintenance`
38+
39+ assert . equal ( await convert ( input ) , output )
40+ } )
You can’t perform that action at this time.
0 commit comments