smartfile/test.js
2015-12-08 20:33:13 +01:00

10 lines
497 B
JavaScript

/// <reference path="typings/tsd.d.ts" />
var smartfile = require("./index.js");
var beautylog = require("beautylog")("os");
beautylog.info(smartfile.readFileToString("./test/mytest.txt"));
console.log(smartfile.readFileToObject("./test/mytest.yaml"));
console.log(smartfile.readFileToObject("./test/mytest.json"));
console.log(smartfile.readFileToVinyl("./test/mytest.json"));
//var thisIsAnError = smartfile.readFileToObject("./test/mytestDoesNotExist.json");
beautylog.success("Test passed!");