Skip to content

Commit

Permalink
change safeLoad to load
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Jan 5, 2021
1 parent 22b4773 commit 08e3756
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __tests__/get-inputs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ beforeEach(() => {
process.stdout.write = jest.fn();

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const doc: any = yaml.safeLoad(fs.readFileSync(__dirname + '/../action.yml', 'utf8'));
const doc: any = yaml.load(fs.readFileSync(__dirname + '/../action.yml', 'utf8'));
Object.keys(doc.inputs).forEach(name => {
const envVar = `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
process.env[envVar] = doc.inputs[name]['default'];
Expand All @@ -19,7 +19,7 @@ beforeEach(() => {

afterEach(() => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const doc: any = yaml.safeLoad(fs.readFileSync(__dirname + '/../action.yml', 'utf8'));
const doc: any = yaml.load(fs.readFileSync(__dirname + '/../action.yml', 'utf8'));
Object.keys(doc.inputs).forEach(name => {
const envVar = `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
console.debug(`delete ${envVar}\t${process.env[envVar]}`);
Expand Down

0 comments on commit 08e3756

Please sign in to comment.