New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sanity/block-content-tests

Package Overview
Dependencies
Maintainers
7
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/block-content-tests - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

fixtures/061-missing-mark-serializer.js

2

package.json
{
"name": "@sanity/block-content-tests",
"version": "0.0.5",
"version": "0.0.6",
"description": "Tests for shared block content rendering logic",

@@ -5,0 +5,0 @@ "main": "tests.js",

const identity = inp => inp
const defaults = {normalize: identity}
const requireAll = require('require-all')
const fixtures = requireAll(`${__dirname }/fixtures`)
const fixtures = requireAll(`${__dirname}/fixtures`)

@@ -14,6 +14,8 @@ module.exports = function runTests(opts = {}) {

.forEach(fixture => {
const highlight = () => h('mark')
const serializers = {marks: {highlight}}
const originalInput = JSON.parse(JSON.stringify(fixture.input))
const passedInput = fixture.input
try {
render({blocks: passedInput})
render({blocks: passedInput, serializers})
} catch (error) {

@@ -220,2 +222,8 @@ // ignore

test('can specify custom serializers for defaults marks', () => {
const {input, output} = require('./fixtures/061-missing-mark-serializer')
const result = render({blocks: input})
expect(result).toEqual(normalize(output))
})
test('can specify custom class name for container', () => {

@@ -222,0 +230,0 @@ const input = [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc