Skip to content

Commit

Permalink
Custom build test specs.
Browse files Browse the repository at this point in the history
  • Loading branch information
shammowla committed Jan 24, 2024
1 parent 3b3fd4e commit 0556160
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
import { exec } from "child_process";
import { assert } from "chai";
const { exec } = require("child_process");
const assert = require("chai").assert;

// eslint-disable-next-line no-unused-vars
test("Check if build completes without errors", async t => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
import { exec } from "child_process";
const { exec } = require("child_process");

test("Check if build fails when expected", async () => {
exec("npm run build:custom -- --exclude nonExistingComponent", error => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
import { exec } from "child_process";
import { assert } from "chai";
const { exec } = require("child_process");
const assert = require("chai").assert;

test("Check if build works with different configurations", async () => {
exec(
Expand Down
4 changes: 2 additions & 2 deletions test/functional/specs/CustomBuild/correctFilesAreGenerated.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
import { exec } from "child_process";
import fs from "fs";
const { exec } = require("child_process");
const fs = require("fs");

test("Check if correct files are generated", async () => {
exec("npm run build:custom", error => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
import { exec } from "child_process";
import { expect } from "chai";
import fs from "fs";
const { exec } = require("child_process");
const expect = require("chai").expect;
const fs = require("fs");

test("Check if excluded components are not present", async () => {
const componentToExclude = "personalization";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
import { exec } from "child_process";
import { expect } from "chai";
import fs from "fs";
const { exec } = require("child_process");
const expect = require("chai").expect;
const fs = require("fs");

test("Check if included components are present", async () => {
const componentToInclude = "personalization";
Expand Down

0 comments on commit 0556160

Please sign in to comment.