Projects
Eulaceura:Factory
nodejs-defence
_service:obs_scm:test.js
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:test.js of Package nodejs-defence
var tape = require('tape') var defence = require('./') var fs = require('fs') var glob = require('glob') var path = require('path') tape.test(function(test) { glob.sync('tests/*') .forEach(function(directory) { test.equal( defence( read(path.join(directory, 'input')), readJSON(path.join(directory, 'infostrings'))), read(path.join(directory, 'output')), directory) }) test.end() }) function read(file) { try { return fs.readFileSync(file).toString() } catch (e) { return undefined } } function readJSON(file) { try { var input = fs.readFileSync(file).toString() return JSON.parse(input) } catch (e) { return undefined } }
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2