feat: convert c-sharp exam tests to Playwright (#54946)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Sem Bauke
2024-06-04 21:09:53 +02:00
committed by GitHub
parent 10fae3d41b
commit 6d7ccc9b1f
6 changed files with 61 additions and 87 deletions
+4 -6
View File
@@ -1,8 +1,10 @@
const path = require('path');
const debug = require('debug');
require('dotenv').config({ path: path.resolve(__dirname, '../../../.env') });
const { MongoClient, ObjectId } = require('mongodb');
const { userIds } = require('./user-data');
require('dotenv').config({ path: path.resolve(__dirname, '../../../.env') });
const args = process.argv.slice(2);
const allowedArgs = ['delete-only'];
@@ -81,11 +83,7 @@ const run = async () => {
const db = client.db('freecodecamp');
const survey = db.collection('Survey');
await survey.deleteMany({
_id: {
$in: surveyIds
}
});
await survey.deleteMany({ userId: { $in: userIds } });
log('Survey info deleted');
if (!args.includes('delete-only')) {