Fix curl export tests

This commit is contained in:
Gregory Schier
2024-05-09 08:18:06 -07:00
parent a14f41a77a
commit 53ce4bfc4f

View File

@@ -1,10 +1,10 @@
import { describe, expect, test } from 'vitest';
import { pluginHookImport } from '../src';
import { pluginHookExport } from '../src';
describe('exporter-curl', () => {
test('Exports GET with params', () => {
expect(
pluginHookImport({
pluginHookExport({
url: 'https://yaak.app',
urlParameters: [
{ name: 'a', value: 'aaa' },
@@ -18,7 +18,7 @@ describe('exporter-curl', () => {
});
test('Exports POST with url form data', () => {
expect(
pluginHookImport({
pluginHookExport({
url: 'https://yaak.app',
method: 'POST',
bodyType: 'application/x-www-form-urlencoded',
@@ -37,7 +37,7 @@ describe('exporter-curl', () => {
test('Exports PUT with multipart form', () => {
expect(
pluginHookImport({
pluginHookExport({
url: 'https://yaak.app',
method: 'PUT',
bodyType: 'multipart/form-data',
@@ -62,7 +62,7 @@ describe('exporter-curl', () => {
test('Exports JSON body', () => {
expect(
pluginHookImport({
pluginHookExport({
url: 'https://yaak.app',
method: 'POST',
bodyType: 'application/json',
@@ -82,7 +82,7 @@ describe('exporter-curl', () => {
test('Exports headers', () => {
expect(
pluginHookImport({
pluginHookExport({
headers: [
{ name: 'a', value: 'aaa' },
{ name: 'b', value: 'bbb', enabled: true },
@@ -94,7 +94,7 @@ describe('exporter-curl', () => {
test('Basic auth', () => {
expect(
pluginHookImport({
pluginHookExport({
url: 'https://yaak.app',
authenticationType: 'basic',
authentication: {
@@ -107,7 +107,7 @@ describe('exporter-curl', () => {
test('Broken basic auth', () => {
expect(
pluginHookImport({
pluginHookExport({
url: 'https://yaak.app',
authenticationType: 'basic',
authentication: {},
@@ -117,7 +117,7 @@ describe('exporter-curl', () => {
test('Digest auth', () => {
expect(
pluginHookImport({
pluginHookExport({
url: 'https://yaak.app',
authenticationType: 'digest',
authentication: {
@@ -130,7 +130,7 @@ describe('exporter-curl', () => {
test('Bearer auth', () => {
expect(
pluginHookImport({
pluginHookExport({
url: 'https://yaak.app',
authenticationType: 'bearer',
authentication: {
@@ -142,7 +142,7 @@ describe('exporter-curl', () => {
test('Broken bearer auth', () => {
expect(
pluginHookImport({
pluginHookExport({
url: 'https://yaak.app',
authenticationType: 'bearer',
authentication: {