You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to validate the creation and substitution of both template and output file in a jest test.
It works perfectly outside of a jest test --> plain js script. Am I missing out on something or is this a bug?
constcustomEnvsubstOptions={all: true,diff: true,system: true,syntax: 'dollar-both',envs: [{name: 'test_env'},{name: 'test_version'}],};consttemplateFilePaths=["<cwd>/.gitlab/node/test/resource/someFileWithEnv-ci.template.yml","<cwd>/.gitlab/node/test/resource/sub-dir/someFileWithEnv-ci.template.yml"];constresolvedTemplateFilePaths=["<cwd>/.gitlab/node/test/resource/someFileWithEnv-ci.yml","<cwd>/.gitlab/node/test/resource/sub-dir/someFileWithEnv-ci.yml"];it('should substitute all given files and write it out to a new file',()=>{constoutputFiles=substituteEnvForAllFiles(templateFilePaths,customEnvsubstOptions);assert.deepEqual(outputFiles,resolvedTemplateFilePaths);});
files:
The yml files to substitute look like this.
.test-template: &test-templateimage: $test_env/bla/bla/image:$test_versiontags:
- test
- nodejs
Thanks already :)
The text was updated successfully, but these errors were encountered:
I am trying to validate the creation and substitution of both template and output file in a jest test.
It works perfectly outside of a jest test --> plain js script. Am I missing out on something or is this a bug?
code(node js):
constant:
function:
test:
files:
The yml files to substitute look like this.
Thanks already :)
The text was updated successfully, but these errors were encountered: