mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
feat: convert c-sharp exam tests to Playwright (#54946)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@@ -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')) {
|
||||
|
||||
Reference in New Issue
Block a user