Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@emdaer/plugin-list

Package Overview
Dependencies
Maintainers
2
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emdaer/plugin-list - npm Package Compare versions

Comparing version
1.0.0-alpha.13
to
1.0.0-beta.0
+31
src/index.test.js
const list = require('../src');
describe('@emdaer/plugin-list', () => {
test('generates ordered lists', async () => {
expect(await list({ type: 'ol', items: ['item1', 'item2'] })).toBe(
'<ol>\n<li>item1</li>\n<li>item2</li>\n</ol>'
);
});
test('generates unordered lists', async () => {
expect(await list({ type: 'ul', items: ['item1', 'item2'] })).toBe(
'<ul>\n<li>item1</li>\n<li>item2</li>\n</ul>'
);
});
test('generates nestedlists', async () => {
expect(
await list({
type: 'ul',
items: [
'item1',
{
plugin: 'list',
options: { type: 'ol', items: ['nested', 'list'] },
},
'item3',
],
})
).toBe(
'<ul>\n<li>item1</li>\n<li><ol>\n<li>nested</li>\n<li>list</li>\n</ol></li>\n<li>item3</li>\n</ul>'
);
});
});
+3
-7
{
"name": "@emdaer/plugin-list",
"description": "an emdaer plugin to add lists",
"version": "1.0.0-alpha.13",
"version": "1.0.0-beta.0",
"repository": "emdaer/emdaer",
"homepage": "https://emdaer.github.io/",
"homepage": "https://emdaer.me/",
"keywords": [

@@ -13,8 +13,4 @@ "emdaer-plugin"

"scripts": {
"write-docs": "emdaer && git add ./README.md",
"prepublish": "flow-remove-types -p src -d lib && npm run write-docs"
"prepublish": "flow-remove-types -p src -i .test.js -d lib"
},
"devDependencies": {
"flow-remove-types": "1.2.1"
},
"publishConfig": {

@@ -21,0 +17,0 @@ "access": "public"

const list = require('../src');
describe('@emdaer/plugin-list', () => {
test('generates ordered lists', async () => {
expect(await list({ type: 'ol', items: ['item1', 'item2'] })).toBe(
'<ol>\n<li>item1</li>\n<li>item2</li>\n</ol>'
);
});
test('generates unordered lists', async () => {
expect(await list({ type: 'ul', items: ['item1', 'item2'] })).toBe(
'<ul>\n<li>item1</li>\n<li>item2</li>\n</ul>'
);
});
test('generates nestedlists', async () => {
expect(
await list({
type: 'ul',
items: [
'item1',
{
plugin: 'list',
options: { type: 'ol', items: ['nested', 'list'] },
},
'item3',
],
})
).toBe(
'<ul>\n<li>item1</li>\n<li><ol>\n<li>nested</li>\n<li>list</li>\n</ol></li>\n<li>item3</li>\n</ul>'
);
});
});
destination: ./README.md
content:
- - heading
-
level: 1
from:
- value-from-package
-
value: name
- - paragraph
-
from:
- value-from-package
-
value: description
transforms:
- - smartypants