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-table

Package Overview
Dependencies
Maintainers
2
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emdaer/plugin-table - npm Package Compare versions

Comparing version
1.0.0-alpha.13
to
1.0.0-beta.0
+27
src/index.test.js
const table = require('../src');
describe('@emdaer/plugin-table', () => {
test('generates tables with headers', async () => {
expect(await table({ headers: ['A', 'B', 'C'] })).toBe(
'<table><tr><th>A</th><th>B</th><th>C</th></tr></table>'
);
});
test('generates tables with rows', async () => {
expect(await table({ rows: [[1, 2, 3], [2, 3, 4], [3, 4, 5]] })).toBe(
'<table><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>2</td><td>3</td><td>4</td></tr><tr><td>3</td><td>4</td><td>5</td></tr></table>'
);
});
test('generates tables with headers and rows', async () => {
expect(
await table({
headers: ['A', 'B', 'C'],
rows: [[1, 2, 3], [2, 3, 4], [3, 4, 5]],
})
).toBe(
'<table><tr><th>A</th><th>B</th><th>C</th></tr><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>2</td><td>3</td><td>4</td></tr><tr><td>3</td><td>4</td><td>5</td></tr></table>'
);
});
test('generates tables without headers or rows', async () => {
expect(await table({})).toBe('<table></table>');
});
});
+3
-7
{
"name": "@emdaer/plugin-table",
"description": "an emdaer plugin to generate tables",
"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 table = require('../src');
describe('@emdaer/plugin-table', () => {
test('generates tables with headers', async () => {
expect(await table({ headers: ['A', 'B', 'C'] })).toBe(
'<table><tr><th>A</th><th>B</th><th>C</th></tr></table>'
);
});
test('generates tables with rows', async () => {
expect(await table({ rows: [[1, 2, 3], [2, 3, 4], [3, 4, 5]] })).toBe(
'<table><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>2</td><td>3</td><td>4</td></tr><tr><td>3</td><td>4</td><td>5</td></tr></table>'
);
});
test('generates tables with headers and rows', async () => {
expect(
await table({
headers: ['A', 'B', 'C'],
rows: [[1, 2, 3], [2, 3, 4], [3, 4, 5]],
})
).toBe(
'<table><tr><th>A</th><th>B</th><th>C</th></tr><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>2</td><td>3</td><td>4</td></tr><tr><td>3</td><td>4</td><td>5</td></tr></table>'
);
});
test('generates tables without headers or rows', async () => {
expect(await table({})).toBe('<table></table>');
});
});
destination: ./README.md
content:
- - heading
-
level: 1
from:
- value-from-package
-
value: name
- - paragraph
-
from:
- value-from-package
-
value: description
transforms:
- - smartypants