Skip to content

There is a broken test #351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gurgunday opened this issue Mar 23, 2025 · 0 comments
Open

There is a broken test #351

gurgunday opened this issue Mar 23, 2025 · 0 comments

Comments

@gurgunday
Copy link
Member

I don't know why/when it started failing but we should fix the following test:

# Subtest: When using routes `decompress` settings :
    # Subtest: it should decompress data using the route custom provided `createInflate` method
    ok 1 - it should decompress data using the route custom provided `createInflate` method
      ---
      duration_ms: 52.339101
      ...
    # Subtest: it should decompress data using the route custom provided `createGunzip` method
    ok 2 - it should decompress data using the route custom provided `createGunzip` method
      ---
      duration_ms: 43.431986
      ...
    # Subtest: it should not decompress data when route `decompress` option is set to `false`
    not ok 3 - it should not decompress data when route `decompress` option is set to `false`
      ---
      duration_ms: 11.892011
      location: '/home/runner/work/fastify-compress/fastify-compress/test/routes-decompress.test.js:139:3'
      failureType: 'testCodeFailure'
      error: |-
        Expected values to be loosely deep-equal:
        
        {
          error: 'Bad Request',
          message: `Unexpected token '\x1F', "\x1F�\b\x00\x00\x00\x00\x00\x00\x03"... is not valid JSON`,
          statusCode: 400
        }
        
        should loosely deep-equal
        
        {
          code: 'FST_ERR_CTP_INVALID_CONTENT_LENGTH',
          error: 'Bad Request',
          message: 'Request body size did not match Content-Length',
          statusCode: 400
        }
      code: 'ERR_ASSERTION'
      name: 'AssertionError'
      expected:
        statusCode: 400
        code: 'FST_ERR_CTP_INVALID_CONTENT_LENGTH'
        error: 'Bad Request'
        message: 'Request body size did not match Content-Length'
      actual:
        statusCode: 400
        error: 'Bad Request'
        message: `Unexpected token '\x1F', "\x1F�\b\x00\x00\x00\x00\x00\x00\x03"... is not valid JSON`
      operator: 'deepEqual'
      stack: |-
        assert.<computed> [as deepEqual] (node:internal/test_runner/test:254:18)
        TestContext.<anonymous> (/home/runner/work/fastify-compress/fastify-compress/test/routes-decompress.test.js:186:14)
        process.processTicksAndRejections (node:internal/process/task_queues:105:5)
        async Test.run (node:internal/test_runner/test:980:9)
        async Suite.processPendingSubtests (node:internal/test_runner/test:677:7)
      ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant