mirror of
https://github.com/actions/configure-pages.git
synced 2026-03-30 10:04:52 +00:00
Refactor to inject multiple properties
This commit is contained in:
@@ -130,7 +130,7 @@ const cases = [
|
||||
property: 'a.b.c',
|
||||
source: `var config = { a: { b: [], c: "hello"}}; module.exports = config`,
|
||||
expected: `var config = { a: { b: { c: "value"}, c: "hello"}}; module.exports = config`
|
||||
},
|
||||
}
|
||||
]
|
||||
|
||||
describe('config-parser', () => {
|
||||
@@ -146,10 +146,8 @@ describe('config-parser', () => {
|
||||
|
||||
// Update the settings and do the injection
|
||||
new ConfigParser({
|
||||
configurationFile: sourceFile,
|
||||
propertyName: property,
|
||||
propertyValue: 'value'
|
||||
}).inject()
|
||||
configurationFile: sourceFile
|
||||
}).inject(property, 'value')
|
||||
|
||||
// Compare the files
|
||||
compareFiles(sourceFile, expectedFile)
|
||||
|
||||
Reference in New Issue
Block a user