Skip to content

Commit 9c429b6

Browse files
style: 🚨 Rodei o "format" que eu havia esquecido no ultimo commit.
1 parent a18094d commit 9c429b6

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

index.js

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ puppeteer.use(AdblockerPlugin({ useCache: false }));
1616
const config_file = process.argv.slice(2)[0]
1717
? process.argv.slice(2)[0]
1818
: new Error(
19-
'File not specified as start param. Please inform the filename with its extension as --file in start script.'
20-
);
19+
'File not specified as start param. Please inform the filename with its extension as --file in start script.'
20+
);
2121

2222
// Defining xlsx as default value.
2323
let export_opt = 'xlsx';
@@ -33,7 +33,7 @@ if (process.argv.slice(2)[1] === 'xlsx') {
3333
let filename = `${__dirname}/results/results_${new Date().getTime()}.${export_opt}`;
3434

3535
const configFile = require(`./config/${config_file}`);
36-
configFile.validator.forEach( async (config) => {
36+
configFile.validator.forEach(async (config) => {
3737
const schema = require(`./schema/${config.schema_name[0]}`);
3838
// let startChromeInDebugMode = async () => {
3939
// let operatingSystem = os.platform();
@@ -91,13 +91,9 @@ configFile.validator.forEach( async (config) => {
9191
page.on('load', async () => {
9292
await page.waitFor(2000);
9393
if (page.url() === config.url) {
94-
await fs.appendFileSync(
95-
filename,
96-
`Url validating: ${page.url()}\n`,
97-
(err) => {
98-
if (err) throw err;
99-
}
100-
);
94+
await fs.appendFileSync(filename, `Url validating: ${page.url()}\n`, (err) => {
95+
if (err) throw err;
96+
});
10197
//doc.text(path, 10, 10);
10298
await page.evaluate(() => {
10399
//Validate first hits.
@@ -115,13 +111,9 @@ configFile.validator.forEach( async (config) => {
115111
await browser.close();
116112
}
117113
} else {
118-
await fs.appendFileSync(
119-
filename,
120-
`Path : ${page.url()}\n`,
121-
(err) => {
122-
if (err) throw err;
123-
}
124-
);
114+
await fs.appendFileSync(filename, `Path : ${page.url()}\n`, (err) => {
115+
if (err) throw err;
116+
});
125117
//doc.text(path, 10, 10);
126118
}
127119
});
@@ -131,7 +123,7 @@ configFile.validator.forEach( async (config) => {
131123

132124
await runAfterGTMDebug();
133125

134-
await fs.appendFile(filename, '', () => { });
126+
await fs.appendFile(filename, '', () => {});
135127

136128
let cleanupEval = () => {
137129
console.log('Realizing last eval');
@@ -156,4 +148,4 @@ configFile.validator.forEach( async (config) => {
156148

157149
await process.on('exit', cleanupEval);
158150
})();
159-
})
151+
});

0 commit comments

Comments
 (0)