Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('svg-sprite', function () {
var weather = glob.glob.sync('**/weather*.svg', { cwd: cwdWeather }),
align = glob.glob.sync('**/*.svg', { cwd: cwdAlign }),
previewTemplate = fs.readFileSync(path.join(__dirname, 'tmpl', 'css.html'), 'utf-8');
describe('with no arguments', function () {
var spriter = new SVGSpriter({
shape: {
dest: 'svg'
}
});
describe('with no SVG files', function () {
it('has an empty result', function (done) {
spriter.compile(function (error, result, data) {
should(error).not.ok;
should(result).be.an.Object;
should(result).be.empty;
should(data).be.an.Object;
files.forEach(function (file) {
spriter.add(
path.resolve(path.join(cwd, file)),
file,
fs.readFileSync(path.join(cwd, file), { encoding: 'utf-8' })
);
});
}