Skip to content

Commit

Permalink
[#56779] Allow empty lines (#96)
Browse files Browse the repository at this point in the history
* [#56779] Allow empty lines

https://community.openproject.org/work_packages/56779

* remove console.log

* workaround for missing multiple blank lines support in markdown

* remove regex workaround; add necessary node replacements

* remove console.log

* add ckeditor test environment for jest

* disable out-of-scope encoding tests

* add specs for blank lines in markdown

* fix empty markdown creating a break

* support empty lines in lists

* only run tests for supported LTS version

* avoid "growing" code block; avoid removal of empty code blocks

* cleanup
  • Loading branch information
as-op authored Sep 23, 2024
1 parent c4813fb commit c64ad5c
Show file tree
Hide file tree
Showing 29 changed files with 4,450 additions and 698 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

env:
Expand Down
13 changes: 13 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
presets: [
[
"@babel/preset-env",
{
targets: {
node: "current",
},
},
],
],
plugins: ["@babel/plugin-transform-modules-commonjs"]
}
9 changes: 0 additions & 9 deletions config/babel.config.json

This file was deleted.

198 changes: 0 additions & 198 deletions config/jest.config.js

This file was deleted.

32 changes: 32 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/

module.exports = {
// Automatically clear mock calls, instances, contexts and results before every test
clearMocks: true,
// Indicates whether the coverage information should be collected while executing the test
collectCoverage: true,
// The directory where Jest should output its coverage files
coverageDirectory: "coverage",
// A list of paths to directories that Jest should use to search for files in
roots: [
"tests",
"src"
],
// A map from regular expressions to paths to transformers
transform: {
'^.+\\.js$': 'babel-jest',
},
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
moduleNameMapper: {
"\\.(css|less|scss|sass)$": "identity-obj-proxy"
},
// The test environment that will be used for testing
testEnvironment: "jsdom",
// The paths to modules that run some code to configure or set up the testing environment before each test
setupFiles: ['<rootDir>/jest.setup.js'],
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
transformIgnorePatterns: []
};
5 changes: 5 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { escape } from 'underscore'

global._ = {
escape: escape
}
Loading

0 comments on commit c64ad5c

Please sign in to comment.