Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date in report file name #53

Open
Harvo09 opened this issue Aug 9, 2023 · 1 comment
Open

Date in report file name #53

Harvo09 opened this issue Aug 9, 2023 · 1 comment

Comments

@Harvo09
Copy link

Harvo09 commented Aug 9, 2023

I am looking to create a new file each run with the date or date time in

let filename = 'reports/myreport' + datetime + '.html'

return { ${filename} : htmlReport(data, { title: "My First Report", debug: false }) };

I thought this would work.......it doesn't

@remcorakers
Copy link

@Harvo09 you can do something like this:

export const handleSummary = (data: any) => {
  return {
    [`./reports/myreport${new Date().toISOString()}.html`]: htmlReport(data),
    stdout: textSummary(data, { indent: ' ', enableColors: true }),
  };
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants