-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
127 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,13 @@ | ||
import { createLocalVue, shallowMount } from "@vue/test-utils" | ||
import { describe, expect, it } from "vitest" | ||
import { shallowMount } from '@vue/test-utils' | ||
import { describe, expect, it } from 'vitest' | ||
|
||
import Content from "@/components/bodies/Content.vue" | ||
import Content from '@/components/bodies/Content.vue' | ||
|
||
const localVue = createLocalVue() | ||
|
||
describe("Content.vue", () => { | ||
describe("#codeType", () => { | ||
it("returns plaintext", () => { | ||
const wrapper = shallowMount(Content, { | ||
localVue, | ||
propsData: { content: "foo", contentType: "text/plain" } | ||
}) | ||
expect(wrapper.find("code.plaintext")) | ||
}) | ||
|
||
it("returns html", () => { | ||
const wrapper = shallowMount(Content, { | ||
propsData: { content: "foo", contentType: "text/html" } | ||
}) | ||
expect(wrapper.find("code.html")) | ||
describe('Content.vue', () => { | ||
it('returns html', () => { | ||
const wrapper = shallowMount(Content, { | ||
propsData: { content: 'foo', contentType: 'text/html' } | ||
}) | ||
expect(wrapper.find('code.html')) | ||
}) | ||
}) |
19 changes: 8 additions & 11 deletions
19
frontend/tests/unit/components/headers/otherHeaders.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 8 additions & 11 deletions
19
frontend/tests/unit/components/headers/securityHeaders.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import { describe, expect, it } from "vitest" | ||
import { describe, expect, it } from 'vitest' | ||
|
||
import { Shodan } from "@/links/shodan" | ||
import { Shodan } from '@/links/shodan' | ||
|
||
describe("Shodan", function () { | ||
describe('Shodan', function () { | ||
const subject = new Shodan() | ||
|
||
describe("#type", function () { | ||
it("equals to ip_address", function () { | ||
expect(subject.type).toEqual("ip_address") | ||
describe('#type', function () { | ||
it('equals to ip_address', function () { | ||
expect(subject.type).toEqual('ip') | ||
}) | ||
}) | ||
|
||
describe("#href", function () { | ||
it("returns URL", function () { | ||
const value = "1.1.1.1" | ||
expect(subject.href(value)).toEqual("https://www.shodan.io/host/1.1.1.1") | ||
describe('#href', function () { | ||
it('returns URL', function () { | ||
const value = '1.1.1.1' | ||
expect(subject.href(value)).toEqual('https://www.shodan.io/host/1.1.1.1') | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.