Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ministryofjustice/fb-nunjucks-helpers

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ministryofjustice/fb-nunjucks-helpers - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

6

lib/fb-nunjucks-helpers.unit.spec.js

@@ -31,3 +31,3 @@ const test = require('tape')

const output = nunjucksEnv.renderString(blockTemplate).trim()
t.equals(output, '<div class="govuk-form-group fb-block-block" data-block-id="blockId" data-block-type="block">\nblockHeadingValue\n</div>', 'it should render the corresponding block')
t.equals(output, '<div class="fb-block fb-block-block govuk-form-group" data-block-id="blockId" data-block-type="block">\nblockHeadingValue\n</div>', 'it should render the corresponding block')

@@ -47,3 +47,3 @@ const anotherId = 'anotherBlockId'

const nestedOutput = nunjucksEnv.renderString(nestedTemplate).trim()
t.equals(nestedOutput, '<div class="govuk-form-group fb-block-anotherblock" data-block-id="anotherBlockId" data-block-type="anotherblock">\nblockTitleValue\n<div class="govuk-form-group fb-block-block" data-block-id="innerBlockId" data-block-type="block">\ninnerBlockHeadingValue\n</div>\n</div>', 'it should render nested callBlock')
t.equals(nestedOutput, '<div class="fb-block fb-block-anotherblock govuk-form-group" data-block-id="anotherBlockId" data-block-type="anotherblock">\nblockTitleValue\n<div class="fb-block fb-block-block govuk-form-group" data-block-id="innerBlockId" data-block-type="block">\ninnerBlockHeadingValue\n</div>\n</div>', 'it should render nested callBlock')

@@ -73,5 +73,5 @@ t.end()

const output = nunjucksEnv.renderString(blocksTemplate).trim()
t.equals(output, '<div class="govuk-form-group fb-block-anotherblock" data-block-id="blockId" data-block-type="anotherblock">\nblockTitleValue\n<div class="govuk-form-group fb-block-block" data-block-id="innerBlockId" data-block-type="block">\ninnerBlockHeadingValue\n</div>\n</div><div class="govuk-form-group fb-block-block" data-block-id="blockId" data-block-type="block">\nblockHeadingValue\n</div>', 'it should render nested callBlock')
t.equals(output, '<div class="fb-block fb-block-anotherblock govuk-form-group" data-block-id="blockId" data-block-type="anotherblock">\nblockTitleValue\n<div class="fb-block fb-block-block govuk-form-group" data-block-id="innerBlockId" data-block-type="block">\ninnerBlockHeadingValue\n</div>\n</div><div class="fb-block fb-block-block govuk-form-group" data-block-id="blockId" data-block-type="block">\nblockHeadingValue\n</div>', 'it should render nested callBlock')
t.end()
})
{
"name": "@ministryofjustice/fb-nunjucks-helpers",
"version": "0.0.12",
"version": "0.0.13",
"description": "Form Builder Nunjucks helpers",

@@ -5,0 +5,0 @@ "main": "lib/fb-nunjucks-helpers.js",

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