UNPKG

openclient

Version:

An opinionated client for RESTful APIs (particularly OpenStack's).

17 lines (11 loc) 394 B
var expect = require('chai').expect, utils = require('../../client/utils'); describe('Interpolate', function () { it('should replace markers in strings', function (done) { var string = "/{foo}/and/{bar}", expected = "/good/and/great", context = {foo: "good", bar: "great"}; expect(utils.interpolate(string, context)).to.equal(expected); done(); }); });