Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add license headers to test files #4482

Merged
merged 1 commit into from
Mar 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions js/__tests__/SaveInterface.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Diwangshu Kakoty
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

global.Midi = jest.fn().mockImplementation(() => ({
header: { ticksPerBeat: 480 },
addTrack: jest.fn(() => ({
Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/abc.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Diwangshu Kakoty
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

// Mock global constants
global.NOTATIONNOTE = 0;
global.NOTATIONDURATION = 1;
Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/artwork.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Om Santosh Suneri
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

global._THIS_IS_TURTLE_BLOCKS_ = true;
const { showMaterialHighlight, hideButtonHighlight, hidePaletteNameDisplay, COLLAPSEBUTTONXOFF, STANDARDBLOCKHEIGHT, FILLCOLORS, TURTLESVG } = require('../artwork');

Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/background.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Om Santosh Suneri
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

describe("Browser Action Behavior", () => {
let mockBrowser;
let mockChrome;
Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/base64Utils.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Om Santosh Suneri
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const base64Utils = require('../base64Utils');
global.TextEncoder = require('util').TextEncoder;
global.TextDecoder = require('util').TextDecoder;
Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/basicblocks.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Justin Charles
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const { initBasicProtoBlocks, BACKWARDCOMPATIBILIYDICT } = require('../basicblocks');

const mockActivity = {
Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/blockfactory.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Om Santosh Suneri
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const { SVG } = require('../blockfactory');
const { platformColor } = require('../utils/platformstyle');
global.platformColor = platformColor;
Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/boundary.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Justin Charles
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

global.base64Encode = jest.fn((str) => str);
global.createjs = {
Container: jest.fn(() => ({
Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/languagebox.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Justin Charles
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const LanguageBox = require("../languagebox");

const mockActivity = {
Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/macros.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Om Santosh Suneri
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const blockIsMacro = require("../macros");
const getMacroExpansion = require("../macros");
global._ = jest.fn((str) => str);
Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/midi.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Diwangshu Kakoty
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const { getClosestStandardNoteValue, transcribeMidi } = require('../midi');

const mockMidi = {
Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/mxml.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Om Santosh Suneri
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const saveMxmlOutput = require("../mxml");

describe("saveMxmlOutput", () => {
Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/notation.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Om Santosh Suneri
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const Notation = require('../notation');
const { durationToNoteValue, convertFactor } = require('../utils/musicutils');
global.convertFactor = convertFactor;
Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/palette.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Om Santosh Suneri
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const { Palettes, initPalettes } = require('../palette');

global.LEADING = 10;
Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/pastebox.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Justin Charles
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const PasteBox = require("../pastebox");

const mockActivity = {
Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/planetInterface.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Om Santosh Suneri
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const PlanetInterface = require('../planetInterface');
global.platformColor = {
header: '#8bc34a'
Expand Down
19 changes: 19 additions & 0 deletions js/__tests__/protoblocks.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
* @license
* MusicBlocks v3.4.1
* Copyright (C) 2025 Om Santosh Suneri
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const ProtoBlock = require("../protoblocks");
global.createjs = {
Container: jest.fn(() => ({
Expand Down
Loading
Loading