mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-24 22:25:48 +00:00
fix bad path
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import net from 'net'
|
import net from 'net'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
|
import path from 'path'
|
||||||
import { RippleAPI } from 'ripple-api'
|
import { RippleAPI } from 'ripple-api'
|
||||||
import assert from 'assert-diff'
|
import assert from 'assert-diff'
|
||||||
const { schemaValidator } = RippleAPI._PRIVATE
|
const { schemaValidator } = RippleAPI._PRIVATE
|
||||||
@@ -121,17 +122,13 @@ export function getAllPublicMethods(api: RippleAPI) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function loadTestSuites(): LoadedTestSuite[] {
|
export function loadTestSuites(): LoadedTestSuite[] {
|
||||||
const allTests = fs.readdirSync(__dirname, { encoding: 'utf8' })
|
const allTests = fs.readdirSync(path.join(__dirname, 'api'), { encoding: 'utf8' })
|
||||||
return allTests
|
return allTests
|
||||||
.map(methodName => {
|
.map(methodName => {
|
||||||
if (
|
if (methodName.startsWith('.DS_Store')) {
|
||||||
methodName.startsWith('index') ||
|
|
||||||
methodName.startsWith('utils') ||
|
|
||||||
methodName.startsWith('.DS_Store')
|
|
||||||
) {
|
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
const testSuite = require(`./${methodName}`)
|
const testSuite = require(`./api/${methodName}`)
|
||||||
return {
|
return {
|
||||||
name: methodName,
|
name: methodName,
|
||||||
config: testSuite.config || {},
|
config: testSuite.config || {},
|
||||||
|
|||||||
Reference in New Issue
Block a user