<commit_before>require("../../src/bus")
require("../../src/doaction")
require("../../src/never")
require("../../src/takewhile")
require("../../src/concat")
require("../../src/property")
require("../../src/eventstream")
Bacon = require("../../src/core").default
expect = require("chai").expect
{
  expectStreamEvents,
  expectPropertyEvents,
  series,
  error,
  once,
  take,
  fromArray,
  semiunstable,
  lessThan,
  repeat,
  unstable,
  sequentially
} = require("../SpecHelper")
describe "Property.concat", ->
  describe "provides values from streams in given order and ends when both are exhausted", ->
    expectPropertyEvents(
      ->
        left = series(2, [1, error(), 2, 3]).toProperty()
        right = series(1, [4, 5, 6]).toProperty()
        left.concat(right)
      [1, error(), 2, 3, 4, 5, 6], semiunstable)
  describe "works with Bacon.never()", ->
    expectPropertyEvents(
      -> Bacon.constant(1).toProperty().concat(Bacon.never())
      [1])
  describe "works with Bacon.once()", -><commit_msg>remove unnecessary .toProperty()<commit_after>require("../../src/bus")
require("../../src/doaction")
require("../../src/never")
require("../../src/takewhile")
require("../../src/concat")
require("../../src/property")
require("../../src/eventstream")
Bacon = require("../../src/core").default
expect = require("chai").expect
{
  expectStreamEvents,
  expectPropertyEvents,
  series,
  error,
  once,
  take,
  fromArray,
  semiunstable,
  lessThan,
  repeat,
  unstable,
  sequentially
} = require("../SpecHelper")
describe "Property.concat", ->
  describe "provides values from streams in given order and ends when both are exhausted", ->
    expectPropertyEvents(
      ->
        left = series(2, [1, error(), 2, 3]).toProperty()
        right = series(1, [4, 5, 6]).toProperty()
        left.concat(right)
      [1, error(), 2, 3, 4, 5, 6], semiunstable)
  describe "works with Bacon.never()", ->
    expectPropertyEvents(
      -> Bacon.constant(1).concat(Bacon.never())
      [1])
  describe "works with Bacon.once()", ->
{'fraction_non_alphanumeric': 0.20332355816226785, 'fraction_numerical': 0.015640273704789834, 'mean_word_length': 3.118712273641851, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '323622', 'n_tokens_mistral': 655, 'n_tokens_neox': 624, 'n_words': 146}