Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const test = require("ava");
const ui5Builder = require("../../../");
const tasks = ui5Builder.builder.tasks;
const ui5Fs = require("@ui5/fs");
const resourceFactory = ui5Fs.resourceFactory;
const DuplexCollection = ui5Fs.DuplexCollection;
test("integration: replace copyright", (t) => {
const reader = resourceFactory.createAdapter({
virBasePath: "/"
});
const writer = resourceFactory.createAdapter({
virBasePath: "/"
});
const workspace = new DuplexCollection({reader, writer});
/* eslint-disable no-useless-escape */
const content = `/*!
* $\{copyright\}
*/
console.log('HelloWorld');`;
/* eslint-enable no-useless-escape */
const test = require("ava");
const ui5Builder = require("../../../");
const tasks = ui5Builder.builder.tasks;
const ui5Fs = require("@ui5/fs");
const resourceFactory = ui5Fs.resourceFactory;
const DuplexCollection = ui5Fs.DuplexCollection;
test("integration: replace version", (t) => {
const reader = resourceFactory.createAdapter({
virBasePath: "/"
});
const writer = resourceFactory.createAdapter({
virBasePath: "/"
});
const content = "console.log('${version}');";
const expected = "console.log('1.337.0');";
const resource = resourceFactory.createResource({
path: "/test.js",
string: content
});
const test = require("ava");
const ui5Builder = require("../../../");
const tasks = ui5Builder.builder.tasks;
const ui5Fs = require("@ui5/fs");
const resourceFactory = ui5Fs.resourceFactory;
const DuplexCollection = ui5Fs.DuplexCollection;
test("integration: uglify", (t) => {
const reader = resourceFactory.createAdapter({
virBasePath: "/"
});
const writer = resourceFactory.createAdapter({
virBasePath: "/"
});
const duplexCollection = new DuplexCollection({reader: reader, writer: writer});
const content = `
function test(paramA) {
var variableA = paramA;
console.log(variableA);
}
test();`;
const testResource = resourceFactory.createResource({
const test = require("ava");
const ui5Builder = require("../../../");
const tasks = ui5Builder.builder.tasks;
const ui5Fs = require("@ui5/fs");
const resourceFactory = ui5Fs.resourceFactory;
const DuplexCollection = ui5Fs.DuplexCollection;
test("integration: simple", (t) => {
const reader = resourceFactory.createAdapter({
virBasePath: "/"
});
const writer = resourceFactory.createAdapter({
virBasePath: "/"
});
const duplexCollection = new DuplexCollection({reader, writer});
const dependencies = resourceFactory.createAdapter({
virBasePath: "/"
});
const content =
`@deepSea: #123456;
.fluffyHammer {