mirror of
https://github.com/jlengrand/push-adyen-collections-to-postman-javascript-action.git
synced 2026-03-10 08:41:23 +00:00
Move to ESModules for local run and adds testing library
This commit is contained in:
2
.github/workflows/sampletest.yml
vendored
2
.github/workflows/sampletest.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v35
|
||||
with:
|
||||
files: tests/*.yml
|
||||
files: samples/*.yml
|
||||
- name: push-adyen-collections-to-postman-javascript-action
|
||||
id: process
|
||||
uses: jlengrand/push-adyen-collections-to-postman-javascript-action@main
|
||||
|
||||
433
dist/index.js
vendored
433
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,8 @@
|
||||
const postman = require('./postmanLibrary');
|
||||
const util = require('util')
|
||||
require('dotenv').config()
|
||||
import * as postman from './postmanLibrary.js';
|
||||
import * as dotenv from 'dotenv';
|
||||
import * as util from 'util';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const POSTMAN_API_KEY = process.env.POSTMAN_API_KEY;
|
||||
const POSTMAN_WORKSPACE_ID = process.env.POSTMAN_WORKSPACE_ID;
|
||||
|
||||
6019
package-lock.json
generated
6019
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -3,8 +3,9 @@
|
||||
"version": "0.1",
|
||||
"description": "This action will push the Adyen collections to Postman.",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"test": "uvu tests",
|
||||
"local": "node localRun.js",
|
||||
"build": "ncc build index.js --license licenses.txt",
|
||||
"prepare": "husky install"
|
||||
@@ -27,6 +28,7 @@
|
||||
"dotenv": "^16.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"husky": "^8.0.0"
|
||||
"husky": "^8.0.0",
|
||||
"uvu": "^0.5.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const https = require('https');
|
||||
import * as https from 'https';
|
||||
|
||||
exports.getWorkspace= async function(workspaceId, postmanApiKey) {
|
||||
export async function getWorkspace(workspaceId, postmanApiKey) {
|
||||
const options = {
|
||||
hostname: 'api.getpostman.com',
|
||||
port: 443,
|
||||
|
||||
10
tests/sort.js
Normal file
10
tests/sort.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import { test } from 'uvu';
|
||||
import * as assert from 'uvu/assert';
|
||||
|
||||
import {list} from '../sort.js';
|
||||
test('sort.list', () => {
|
||||
assert.equal(list(), []);
|
||||
});
|
||||
|
||||
|
||||
test.run();
|
||||
Reference in New Issue
Block a user