<commit_before>const {
  stripProjectRoot,
  upload,
} = require('./index');

test('upload function exists', () => {
  expect(typeof upload).toBe('function');
});

describe('stripProjectRoot', () => {
  test('strips project root', () => {
    expect(stripProjectRoot(
      '/Users/test/git/my-app/',
      '/Users/test/git/my-app/src/index.js'
    )).toBe('src/index.js');
  });

  test('strips project root with no trailing slash', () => {
    expect(stripProjectRoot(
      '/Users/test/git/my-app',
      '/Users/test/git/my-app/src/index.js'
    )).toBe('src/index.js');
  });

  test(`wont strip project root when path is not within project root`, () => {<commit_msg>make tests work on node4<commit_after>'use strict';

const stripProjectRoot = require('./index').stripProjectRoot
const upload = require('./index').upload

test('upload function exists', () => {
  expect(typeof upload).toBe('function');
});

describe('stripProjectRoot', () => {
  test('strips project root', () => {
    expect(stripProjectRoot(
      '/Users/test/git/my-app/',
      '/Users/test/git/my-app/src/index.js'
    )).toBe('src/index.js');
  });

  test('strips project root with no trailing slash', () => {
    expect(stripProjectRoot(
      '/Users/test/git/my-app',
      '/Users/test/git/my-app/src/index.js'
    )).toBe('src/index.js');
  });

  test(`wont strip project root when path is not within project root`, () => {
{'fraction_non_alphanumeric': 0.20042492917847027, 'fraction_numerical': 0.000708215297450425, 'mean_word_length': 3.4294670846394983, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '4281746', 'n_tokens_mistral': 463, 'n_tokens_neox': 450, 'n_words': 86}