<commit_before>"use strict"

var o = require("../../ospec/ospec")
var m = require("../../render/hyperscript")

o.spec("hyperscript", function() {
	o.spec("selector", function() {
		o("throws on null selector", function(done) {
			try {m(null)} catch(e) {done()}
		})
		o("throws on non-string selector w/o a view property", function(done) {
			try {m({})} catch(e) {done()}
		})
		o("handles tag in selector", function() {
			var vnode = m("a")

			o(vnode.tag).equals("a")
		})
		o("v1.0.1 bug-for-bug regression suite", function(){
			o
			console.log(m('a', {
				class: null
			}).attrs, {
				class: undefined,
				className: null
			})
			o(m('a', {
				class: null
			}).attrs).deepEquals({
				class: undefined,
				className: null
			})
			o(m('a', {
				class: undefined
			}).attrs).deepEquals({
				class: undefined,
			})
			o(m('a', {
				class: false
			}).attrs).deepEquals({
				class: undefined,
				className: false
			})
			o(m('a', {
				class: true
			}).attrs).deepEquals({
				class: undefined,
				className: true
			})
			console.log(m('a.x', {
				class: null
			}).attrs, {
				class: undefined,
				className: "x null"
			})
			o(m('a.x', {
				class: null
			}).attrs).deepEquals({
				class: undefined,
				className: "x null"
			})
			o(m('a.x', {
				class: undefined
			}).attrs).deepEquals({
				class: undefined,
				className: "x"
			})
			o(m('a.x', {
				class: false
			}).attrs).deepEquals({
				class: undefined,
				className: "x false"
			})
			o(m('a.x', {
				class: true
			}).attrs).deepEquals({
				class: undefined,
				className: "x true"<commit_msg>removed console.log<commit_after>"use strict"

var o = require("../../ospec/ospec")
var m = require("../../render/hyperscript")

o.spec("hyperscript", function() {
	o.spec("selector", function() {
		o("throws on null selector", function(done) {
			try {m(null)} catch(e) {done()}
		})
		o("throws on non-string selector w/o a view property", function(done) {
			try {m({})} catch(e) {done()}
		})
		o("handles tag in selector", function() {
			var vnode = m("a")

			o(vnode.tag).equals("a")
		})
		o("v1.0.1 bug-for-bug regression suite", function(){
			o(m('a', {
				class: null
			}).attrs).deepEquals({
				class: undefined,
				className: null
			})
			o(m('a', {
				class: undefined
			}).attrs).deepEquals({
				class: undefined,
			})
			o(m('a', {
				class: false
			}).attrs).deepEquals({
				class: undefined,
				className: false
			})
			o(m('a', {
				class: true
			}).attrs).deepEquals({
				class: undefined,
				className: true
			})
			o(m('a.x', {
				class: null
			}).attrs).deepEquals({
				class: undefined,
				className: "x null"
			})
			o(m('a.x', {
				class: undefined
			}).attrs).deepEquals({
				class: undefined,
				className: "x"
			})
			o(m('a.x', {
				class: false
			}).attrs).deepEquals({
				class: undefined,
				className: "x false"
			})
			o(m('a.x', {
				class: true
			}).attrs).deepEquals({
				class: undefined,
				className: "x true"
{'fraction_non_alphanumeric': 0.20127047810096957, 'fraction_numerical': 0.0020060180541624875, 'mean_word_length': 2.635479951397327, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2209308', 'n_tokens_mistral': 1366, 'n_tokens_neox': 1070, 'n_words': 244}