Skip to content

Commit

Permalink
add field to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavphadke1 committed Oct 15, 2023
1 parent 4edc855 commit 11040a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scrapers/classes/parsersxe/tests/bannerv9Parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,21 @@ describe("getAllTermInfos", () => {
it("serializes the term list", async () => {
expect(await bannerv9.getAllTermInfos()).toEqual([
{
active: true,
host: "neu.edu",
subCollege: "NEU",
termId: "3",
text: "Fall 2022 Semester",
},
{
active: true,
host: "neu.edu",
subCollege: "LAW",
termId: "2",
text: "Summer 2022 Semester",
},
{
active: true,
host: "neu.edu",
subCollege: "CPS",
termId: "1",
Expand Down
5 changes: 5 additions & 0 deletions tests/database/dumpProcessor.test.seq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ afterAll(async () => {

const termInfos: TermInfo[] = [
{
active: true,
termId: "123456",
subCollege: "NEU",
text: "This is some text",
},
{
active: true,
termId: "654321",
subCollege: "LAW",
text: "This is some more text",
Expand Down Expand Up @@ -103,6 +105,7 @@ describe("with termInfos", () => {
it("deletes old termInfos", async () => {
await prisma.termInfo.create({
data: {
active: true,
termId: "1",
subCollege: "NEU",
text: "hello",
Expand All @@ -122,6 +125,7 @@ describe("with termInfos", () => {
it("doesn't delete old termInfos if deleteOutdatedData is false", async () => {
await prisma.termInfo.create({
data: {
active: true,
termId: "1",
subCollege: "NEU",
text: "hello",
Expand All @@ -141,6 +145,7 @@ describe("with termInfos", () => {
it("updates existing termInfos", async () => {
await prisma.termInfo.create({
data: {
active: true,
termId: "654321",
subCollege: "fake college",
text: "This is some more text",
Expand Down

0 comments on commit 11040a7

Please sign in to comment.