File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ const templates = {
25
25
}
26
26
}
27
27
28
+ module . exports . templates = templates
29
+
28
30
const convert = async function ( template ) {
29
31
/*
30
32
- 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')
3
3
const assert = require ( 'assert' )
4
4
const { DateTime } = require ( 'luxon' )
5
5
const pkg = require ( '../package.json' )
6
+ const { convert, templates } = require ( '../lib/conversions' )
6
7
const meetings = require ( '../lib/meetings' )
7
8
8
9
suite ( `${ pkg . name } unit` , ( ) => {
@@ -18,3 +19,22 @@ suite(`${pkg.name} unit`, () => {
18
19
assert . deepStrictEqual ( next . toISO ( ) , DateTime . fromISO ( '2020-04-16T13:00:00.0Z' ) . toISO ( ) )
19
20
} )
20
21
} )
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